Creating and Executing an Automated Test Case

In Opkey, you can efficiently create and manage both automated test cases in the Automate section. This section is specifically designed to cater to the needs of Testers and QAs, providing a centralized hub to oversee all test cases and their associated test data.

For example, let's say you need to test a validating user login scenario in an ERP system. With Opkey's recorder, you can quickly create an automated test case by capturing actions such as entering credentials. You can also use keywords to add steps to sign out from the application. 

In this article, we will create and execute a test case for testing signing-in and signing-out functionality on a demo web application.

1. Hover over the Automate section and click Test

2. Click the Create Test button to select Automated Test Case.

3. The "Create Test Case" window opens on the right. Fill in information such as Name, Priority, Description, and choose an Assignee.  You can also add attachments like spreadsheets, videos, images, etc., to this test case. Once done, click the Create button at the bottom.

4. Now, to add steps in the empty test case, click on the "Recorder" option.

5. Select "Web" recorder as we are testing a web application, and click "Start Recording" to begin the recording process. 

6. The Opkey recorder window and a default web page open up. Enter the URL and use the login credentials to sign in to the web page.

7. Once done, click on the "Stop and Save" button and click Yes on the pop-up that follows.

8. Now, you can see the test steps are added in the test case. Save these steps.

9. Select the last step and click on the Add Step button at the top to add a new step after it. Search the ClickButton keyword and click on its search result.

10. Click Dynamic Object for the ClickButton step. The dynamic object possesses changing properties. In this example, we aim to locate the Sign Out button on the webpage. Add Sign Out as the value for the logicalname and TextToSearch parameters in the dynamic object property.

This will enable Opkey to locate the Sign Out button using these object properties and proceed with the step. Finally, click the back icon at the top and close the input data window.

12. Save the test case and click Run icon at the top. Select Run on Browser.

12. Provide a run name and select the desired browser.

Run Wizard Opens up.

14. Click on Advanced Settings to add a build name, select the agent, and finally click on Start Run to begin the execution.

Note: If you are a Mac device user, select Agent Spock to execute the test. Use Opkey Execution Agent to execute test cases on a Windows device.

15. Once the execution is completed, click "View Result" to analyze the test case results.

Step 16: Here we can see our result.

You've reached the end of this article and are now well-prepared to create and execute automated test cases. 

Ready to dive deeper? Check out the next article: Creating Reusable Components.

Explore, experiment, and achieve your testing goals on Opkey!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article