Once you have successfully installed and activated Test Studio, you are ready to setup the machine for testing and create your first automation test. The process is divided in several steps:
- Create new project
- Calibrate your browser for testing
- Add a Test to the Project
- Test Recording
- Test Execution
- Execution Results
When you launch Test Studio, you will see the Welcome Screen. It lets you open or create projects, and see notifications about software updates and news related to the product.
In the Create project section you could choose among different type projects - Web & Desktop, Mobile or API. Let's create a Web & Desktop project for the current demonstration, specify its name and location and click the Create button.
After the project is successfully created, you can open the Tips and Tricks from the top right corner of Test Studio. The popup dialog has many useful references to the documentation and a short video on some of the topics.
You can explore a sample Web & Desktop or API project, from the Get Started section. And you can learn more about the Mobile module in Test Studio.
Once the test project is created you need to configure your browser for testing, we call this "browser calibration". This is done to ensure flawless and consistent automation process. We have implemented a feature to automatically calibrate the browser out of the box without manual actions. In this case we will be using Internet Explorer.
The same project can have different types of tests, organized in folders. Those test can be later added to test lists. For your first test in this project add a new Web test.
Go to the Project ribbon and click on the Add New Test button.
In the Create new test dialog select Web and enter a meaningful name for it.
You can find more information on all test types available in a Test Studio Web & Desktop project:
The Test Studio Recorder will add all actions against the application to your test. You can enable the highlight mode from the recording toolbar and explore the DOM tree of the page and add the necessary verifications steps.
Double click the newly created test to open it. Click the Record button in the Tests ribbon or press CTRL+R.
In the Recording dialog type the URL you want to navigate to, select Internet Explorer browser and press Enter or the Record button. You can choose a URL from your recent URLs.
Note: Selecting the recording browser will be skipped if you have already set a preferred browser from the Test ribbon.
Once the selected browser navigates to the desired page, the recorder gets attached to it. A navigate step is recorded in the Steps pane and you can continue recording the next actions as per the required scenario.
Lets navigate to the Test Studio documentation. Click on DOCS & SUPPORT button, find Test Studio and click it and click on Documentation. All of those actions are recorded as steps in the test.
While a test is being executed do not start another instance of the same browser until the run is finished!
Once a test scenario is already recorded, click the Execute button in the Test ribbon.
Select Internet Explorer as the execution browser and click Run. This step will be skipped if you have already set a preferred browser from the Web ribbon.
The Test Studio Test Runner first launches a command prompt window and opens the selected browser.
By default in the lower right of your screen there is a ribbon which indicates the current step, includes play and pause ability, and shows additional Debug Options if you set a Breakpoint to any step. This is the visual debugger and is a feature you could turn on or off.
Click Debugging Options icon in the Test ribbon or the Visual Studio toolbar to turn the debugger on/off and customize the Auto-Pause Options, if errors occur during the execution.
Enable the Toggle Annotation button to have the browser annotate each step with a brief message and by highlighting that step's element. This will also slow the test run by the configured amount (in milliseconds) between each step. You can set it either from the menu or by entering a custom value.
When the test execution is complete, there will be an indication for each step if it Passed or Failed. Test results are automatically generated and details can be reviewed by clicking on View Log.
The results from test list executions are available in the Results tab.