Understand execution of an automated test case to detect errors faster and enhance application quality

About test execution

Automation testing involves the creation of test cases to ensure the application under test is valid and is deployed without any defects.Test execution is crucial for software testing as it helps to compare the application’s actual functionality to the expected functionality.If the execution results are negative, it signifies that there are faults in the application’s backend codes that need to be fixed. If the execution result is positive, the application is defect-free and ready to go live.

Let us understand the importance of test case execution with the help of a scenario. An updated landing page must be executed to ensure that the page is bug-free and compatible with several browsers. The page will go live if the test execution has no errors. If the execution has bugs, defects will be fixed before the final deployment.

Test case execution in Opkey

There are two ways to execute a test case in Opkey. These are the “Run now” and the “Debug now” features. Using the run now feature, you execute test cases, reusable function libraries, test suites, and Gherkin files in Opkey. Once execution is complete, you can view the execution results to understand the status of the test case and identify errors in the test case if any.

An alternative method of test execution In Opkey is “Debug now”. If you are a developer, you can fix runtime errors in the test case using this feature. You debug a test case by using breakpoints to stop the execution at specific points of the flow having code errors. You can then analyze these codes and detect the cause of bugs in the codes. These faulty codes are then isolated, fixed and executed again to improve the performance of the application.

Opkey execution agent

Before executing a test case in Opkey, you have to install the execution Agent. Opkey execution agent is a test execution engine that helps to trigger test cases in required browsers and operating systems. After installing the execution agent, configure it to make sure that it is compatible with your device. 

You can also execute test cases on web via Spock agent which is a cloud-based agent. The Spock agent is used if the Opkey local execution agent is unavailable.

Other ways to execute test cases 

‍Execution on BrowserStack- You can run test cases on BrowserStack with multiple OS and browser combinations.

Execution via Hub and Grid- Using the utility Opkey Hub, you can execute or queue multiple test cases or test suites for execution parallelly through Grid execution. You can also queue these sessions and the execution will start automatically once the execution agent is available.

Execution via Scheduler- You can schedule the date and time of execution of multiple test suites in different devices with Opkey scheduler.

Execution on Sauce Labs- With Sauce Labs, you can execute test suites on different browsers and devices by choosing the appropriate plugin for execution.

Execution through run with tags- You can execute test suites based on tags added to the function libraries. You can also replace existing function library of a test case with another function library having the same tag.

Once you click the execute button in Opkey, the local Execution wizard page will open. The page displays the information about session name, build name, plugins used and Opkey execution agent. After filling the required details, you select the plugin for the application under test. The Advanced settings option will take you to the snapshots of the test steps. You can see the snapshots of both passed and failed test steps. Once execution is complete you can analyze the execution logs to detect errors in the test case.

Test execution result in Opkey

After performing test execution in Opkey you can view the results. The results provide a detailed overview of the total number of tests performed, test execution status, test execution date and time, snapshots of executed steps, test execution agent used, test execution analytics, and more. Opkey enables you to create test execution reports and export these reports using customizable names, formats, and logos.Test execution results help to analyze data, detect errors in the application before release and fix broken tests and improve software quality.

Best practices of test execution

Make sure the agent is up and running and the server status is set to connected.

While executing make sure to select the correct plugin, and also make sure that the plugin is having an active license.

At a time 2 parallel runs are allowed, if more than 2 executions are triggered it may retun an error there is no resource free on Agent, Do you want to keep remaining execution in queue?

If the test case is having an empty data set, make sure to uncheck it from executing or skip empty data set option can be selected from the advance settings, under the execution wizard to avoid any failure.

In order to make sure that correct object is being picked up doing the execution, user can select highlight object checkbox from the advance settings.

Last but not the least, if working on WFH model make sure to have a good internet bandwidth.

‍Final thoughts

Using Opkey, you can schedule your test cases in different ways based on testing requirements. You can also schedule your test cases or do bulk execution to test an application effortlessly and mitigate risks prior to its production.

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