Evaluation of runtime object states against the model-level states defined in a state model is critical to state based test automation. This paper presents a state mapping framework to support the automated state-based test execution process. The framework automatically keeps track of runtime object states and maps these states to model-level abstract states. It also includes a comparator to determine whether or not a test is successful. This framework is implemented in the aspect-oriented programming language AspectJ. Therefore, the runtime instrumentation mechanism for state evaluation does not modify the source code under test (either in Java or AspectJ). This is an important advantage because otherwise all the changes made to the code for testing purposes have to be cancelled after testing. We have conducted several experiments to evaluate the framework by calculating and comparing the total consumed minutes of mapping states and checking the oracle in terms of manual and automated execution. The experiment results show that the mapping framework is much more effective and efficient than manual conversion.