Follow these steps to install FlexMonkey, setup your application for testing, and record and playback your first test script.
- Download and Install the FlexMonkey Console.
- Start the Console
- The first time you open the console the Project Properties window should be displayed. If it doesn't open automatically, select Project > Properties from the menu
- Enter the Project Directory where you want to store your tests. We recommend you store your tests in a subdirectory (for example, MyFlexProject/tests) of the Flex project you will be testing.
- Enter the Output Source Directory where you want to store your generated tests. We recommend you store your tests in a directory called "src" beneath your Project Directory (for example, MyProject/tests/src)
- Click on the + sign to open the Setup Guide
- Select the version of the Flex SDK you are using to build your project

- Copy automation_monkey.swc to your Flex project's libs directory by dragging and dropping the displayed file icon
.
- In Flash Builder, open your Flex project's Properties window, and verify that the libs directory is in your Flex project's Build Path.

- Select theFlex Compiler panel and copy and paste the compiler arguments from the Setup Guide window into the Additional Compiler Arguments field.

Your compiler arguments should be similar to the following:
Flex 4.x
-locale en_US -include-libraries libs/automation_monkey4.x.swc ${flexlib}/libs/automation/automation_agent.swc
Flex 3.x
-locale en_US -include-libraries libs/automation_monkey4.x.swc ${flexlib}/libs/automation_agent.swc
Note: Only Flash Builder Premium (formerly Flex Builder Professional) contains the required automation_agent.swc.
- Build your project and run your Flex (or AIR) app.
- After your application has loaded, the FlexMonkey Console status should be Connected.

- FlexMonkey organizes tests into a 3-level hierarchy of TestSuites, TestCases, and Tests (like FlexUnit). When we created our new project, a suite, a test case, and an empty test were created. Open the tree to display the test NewTest.
- Select NewTest in the tree and click on the Record button (the leftmost button on the button bar). Note: The Record button is disabled unless you have a test selected.
- Interact with your application. As you perform each action, such as clicking on buttons or typing into text fields, a command will be recorded in the FlexMonkey console.

- Click on the Record button to toggle off recording.
- Select the newly recorded test NewTest, and then click the Play button.
- Your recorded actions will be played back in your application.
- See the FlexMonkey User Guide to learn about:
- Adding verification steps to your script
- Generating ActionScript code from your tests
- Running your tests from Ant
- Creating cusotm automation delegates
- Troubleshooting FlexMonkey