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, and 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.

From the right panel, you can change the mode of the test case. The two available modes are Manual and Automated.

The Datasheet mode allows you to add the datasheet to the test case having stored data in a spreadsheet format. You can either add the Local datasheet or Global Datasheet.

The State tab allows you to change the states of the test case. The available states are Draft, Review, Approve and Publish.

The Milestone option allows to add the respective milestone to the test case.

For example, you can add Testing Post Patch as your milestone. 

The Assignee option allows you to add an assignee. For example, to assign this task to a team member, select their name from the dropdown menu and add them. 

The Reporter option allows you to assign the reporter. For example, to add a Reporter to this task, select the option from the dropdown menu and add them. 

The Reviewer option allows you to select and add the reviewer to this task.

The Priority section allows you to set the priority of the test case. The available options are 

Blocker, Highest, High, Medium, Low. 

Set the due date of the test case using the Due Date option. 

The Tags option allows you to add Tags with a Key and Value. You can effortlessly search for test cases with the set tag. Select the key as Application, Application_Process, or Priority.

Add a value to your test case from the available options in the dropdown. Tick the checkbox for Save for Execution and Click Add. 

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 logical name 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 the 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.

In the Advanced Setting tab, you get the option to choose from the two available options:

Use Suggested plugin - This lets you add the test case specific plugin.

Last used plugin - This lets you select the last used plugin for execution. 


Under More Settings tab, you get the options of :

Update mapped data steps: This helps in updating the mapped data in the present in the steps.

Skip empty data steps: This helps skip the datasets those are empty. 

Randomize input default value

Highlight Object : This helps to highligh the objects during execution

Perform Visibility check

Enable Step Logs : This helps generate step lofs after execution.

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
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article