TestComplete provides you with the ability to automate existing manual tests by replacing the entire test or its individual steps with keyword-driven tests. This allows you to automatically perform some keyword-driven test operations during the manual test run. For example, if you need to perform some actions that do not need to be done manually, you can run a keyword-driven test that will automatically perform these actions.
In earlier versions, you were able to create the manual test steps with the HTML or XML+XSL content. Now you can also assign a keyword-driven test steps to a manual test step. To do this, you first need to select the Keyword Test content type from the Content type drop-down list in the Manual Test editor for the specified test step.
After that, you can select the needed keyword test to be performed during the manual test run. You can type an existing keyword test’s name in the Keyword Test edit box:
You can also click the ellipsis button within the Keyword Test edit box and choose the needed manual test in the ensuing Select Test dialog:
The dialog displays the list of all keyword-driven tests included in the project. If no keyword-driven tests are included in the project, TestComplete shows the appropriate message and does not display the Select Test dialog when you click the ellipsis button. If the KeywordTests project item is not included in your project, the ellipsis button is unavailable, and you cannot specify a keyword-driven test for a manual test step.
Instead of using an existing keyword-driven test as a manual test step, you can convert an existing manual test step with instructions in the HTML or XML+XSL format to a keyword-driven test. To do this, select the needed test step in the Test steps list on the left side of the Manual Test editor and click the Convert Current Step to Keyword Test button on the toolbar located above the list, or right-click the selected step and choose Convert Step to Keyword Test from the context menu.
This will start recording a keyword-driven test. After TestComplete displays the Recording toolbar and the Step Recording dialog with instructions for the current step on screen. You can perform the actions described in the dialog.
All of the actions that you perform relying on the description shown in the dialog will be recorded as keyword-driven test operations. When all of the needed actions have been performed, click the Complete button in the Step Recording dialog or the Stop button on the Recording toolbar to stop recording the keyword-driven test. TestComplete will save the newly recorded keyword-driven test and will automatically replace the HTML or XML+XSL instructions for the manual test step with a link to this test.
Now when you run the manual test, TestComplete will not display test instructions of the test steps that were converted to keyword-driven tests in the Step Description dialog, it will automatically run the specified keyword-driven test.
TestComplete also allows you to view and modify the recorded tests while the original manual test instruction in the HTML or XML+XSL format is left unchanged. So, if you do not want to use the keyword-driven test any more you can change back the step content type to HTML or XML+XSL format using the Content type option and perform the manual test as you did earlier, following the test instructions displayed in the Step Description dialog.
You can also convert individual test steps into the keyword-driven test format as well as the entire manual test. To convert the entire test, right-click somewhere in the step list on the left side of the Manual Test editor and choose Convert Test to Keyword Test from the context menu or use the Convert Manual Test to Keyword Test button on the toolbar located above the list.
This will start recording a keyword-driven test for all of the test steps which have the HTML or XML+XSL content type. During recording, perform the actions described in the Step Recording dialog;
When you finish recording the current step’s actions, click the Complete button in the Step Recording dialog to stop recording the keyword-driven test for the current step and close the dialog. Then TestComplete will start recording a test for the next test step, and so on. If you do not want to convert the current step for which the Step Recording dialog shows instructions, you can click the Skip Step button in the dialog and start converting the next step.
After the keyword-driven tests for the entire test steps have been recorded, TestComplete will suggest creating a common keyword-driven test that will combine all of the test steps of the Keyword Test content type and run them one by one.
By using keyword-driven tests in manual tests you can automatically perform some actions that are not needed to be performed manually and can be performed faster by automating them. We hope you enjoy this new enhancement. If you haven’t tried TestComplete 8 yet, apply for the Beta version.