Hi,
I am new to Ranorex, My project have 1 requirement to create summary report for multiple test execution runs.
The best way to achieve this is by storing test suit results in database (Oracle for e.g.)
However I am unable to figure out on how to capture below basic test results at runtime?
Test Case Name
Module Name
Execution Time stamp
Execution Result
If I am able to capture these values at runtime and store it in a variable then i can pass them to database for storing.
Appreciate quick response as i am currently stuck with this
Thanks
Bhavna
How do i capture module results in variable at runtime
-
- Posts: 5
- Joined: Fri Apr 19, 2019 8:45 am
Re: How do i capture module results in variable at runtime
I believe the TestReport class should be able to give you everything you need:
https://www.ranorex.com/Documentation/R ... Report.htm
Example:
output:
There are some helpful threads here:
get-name-of-test-module-within-code-t2177.html
where-to-get-the-elapsed-time-for-entre ... 12651.html
hope this helps
https://www.ranorex.com/Documentation/R ... Report.htm
Example:
Code: Select all
Report.Info("Test case: " + TestSuite.Current.CurrentTestContainer.Name);
Report.Info("Test module: " + TestReport.CurrentTestModuleActivity.TestModuleName);
Report.Info("Result: " + TestReport.CurrentTestModuleActivity.Status.ToString());
Report.Info("Elapsed Time: " + TestReport.CurrentTestModuleActivity.ElapsedTime.ToString());
Code: Select all
Test case: Test_Case_example123
Test module: Recording1
Result: Success
Elapsed time: 143ms
get-name-of-test-module-within-code-t2177.html
where-to-get-the-elapsed-time-for-entre ... 12651.html
hope this helps
-
- Posts: 5
- Joined: Fri Apr 19, 2019 8:45 am
Re: How do i capture module results in variable at runtime
Thank You Vega,
However i have a specific requirement: Refer to attached test suite heirarchy
I need to store test results in variable:
TestCase Name
Test Execution DateTime
Total Elapsed Time for execution
Test Case result
If Failed, then show failed Module Name and error details.
Please let me know how I can capture that and also where should i place my code so that it runs every time even if the Module is failed.
Thanks
Bhavna
However i have a specific requirement: Refer to attached test suite heirarchy
I need to store test results in variable:
TestCase Name
Test Execution DateTime
Total Elapsed Time for execution
Test Case result
If Failed, then show failed Module Name and error details.
Please let me know how I can capture that and also where should i place my code so that it runs every time even if the Module is failed.
Thanks
Bhavna
You do not have the required permissions to view the files attached to this post.
Re: How do i capture module results in variable at runtime
Well if you want your code to execute no matter what, then you would place it in a teardown region for the test case. This way even if the test case passes or fails, your code will always be executed.
Hope this helps
Hope this helps
-
- Posts: 1
- Joined: Thu Mar 25, 2021 10:33 am
Re: How do i capture module results in variable at runtime
The most useful link on storing hierarchical data in a relational database: https://www.codeproject.com/Articles/27 ... ierarchiesI am new to Ranorex, My project have 1 requirement to create summary to write my essay report for multiple test execution runs. However I am unable to figure out on how to capture below basic test results at runtime?