Debugging issues related to test execution

Debugging test cases in Opkey involves a series of steps to identify, analyze, and resolve issues within the test execution. You can find the error details in the Debug Info section of the test run report as shown below.


Let's learn how to use the details in the test run report to debug a failed test case in Opkey.

Open the Test Run section of Opkey from Reports. 



Open the test case execution result for debugging.


Identify the step where the test case failed. It will be highlighted in red. You can expand a failed component to look at its failed steps. The Step Detail tab on the right panel gives details of the input and output data of the step.


Read the error messages associated with the failed steps in the Debug Info tab on the right panel to understand what went wrong. 


Debugging a Failed test case


1. Ensure that the data used in the test case is correct and valid. For example, admin use credentials are required as test data to login to Oracle test environment. If you give any other credentials in input, the test case fails.

2. Validate that the assertions or input in your test steps are accurate and reflect the expected outcomes. For example, in a test case for verifying that a web element is present, checking if a value matches the expected output result. 

3. Review Test case Logic to ensure there are logical flaws. For example, if you are using IF-Else keywords in the test case, remember to close the loop with EndIF keyword.

4. Check the state of the system under test. Ensure that the environment, execution agent, and plugins are correctly set up.


 

5. Look into Element not found and step timeout errors.

 

6. Make necessary modifications to the test steps, data, or assertions based on your findings. Save the changes to the test case. Run the test case again to verify if the issue is resolved.


7. After re-running the test case, check the execution results to confirm that the previously identified issues are resolved.


8. Issues could also be due to incomplete or incorrect data in keywords. This error occurs when a keyword in the test script is missing required arguments or parameters, leading to test execution failure.


For this you can use the following solutions:

  • Review the keyword in the test script to ensure all required arguments or parameters are provided. Missing or incorrectly formatted arguments can cause this error.
  • Consult the keyword documentation to verify the correct syntax and required inputs for the keyword being used.
  • Ensure that the input data for the keyword is correct, complete, and properly formatted. Incorrect data types or missing values can trigger this error.
  • Create a simplified version of the test using the keyword to confirm that it works with the provided arguments. This can help isolate the issue.




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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article