I need to create a fail suite. When a script passes, I'd like to modify the rxtst file such that when I open the file, all the passing items on the tree are unchecked while all fails remain checked.
Is there a way to programmatically modify the rxtst file from within Ranorex based on on pass/fail state?
How can I create a fail suite by turning passing scripts off in the .rxtst file?
Re: How can I create a fail suite by turning passing scripts off in the .rxtst file?
While you can programmatically turn tests on/off at runtime - perhaps by loading a list of failing tests - this won't work on the .RXTST Test Suite.
Code: Select all
TestSuite.CurrentTestContainer.Checked
Re: How can I create a fail suite by turning passing scripts off in the .rxtst file?
So, this would not check the scripts on and off in the .rxtst file? That's exactly what I'm trying to do.
Re: How can I create a fail suite by turning passing scripts off in the .rxtst file?
Hi,
You can enable/disable test cases/smart folders by this line of code:
Where "TestCasename" you must replace with test case/smart folder name of your choice. So I think the best approach to do what you want, would be to get the list of failing test cases and then then programmatically enable/disable test cases you want. But no, there is no permanent way to enable/disable test cases directly in rxtst file.
You can enable/disable test cases/smart folders by this line of code:
Code: Select all
TestSuite.Current.GetTestContainer(testCaseName).Checked = true;
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How can I create a fail suite by turning passing scripts off in the .rxtst file?
So "testCaseName" is the arbitrary name of the smart folder?
If so, my next question would be, suppose my suite folders are nested like so:
Do I call like so:
The next question would be, "Is there code to get the current TestCaseName so I can use that as my test container parameter?
If so, my next question would be, suppose my suite folders are nested like so:
Code: Select all
MyTopLevelCategory/Mysubcategory/MyTest_01.
Code: Select all
TestSuite.Current.GetTestContainer("MyTopLevelCategory/Mysubcategory/MyTest_01").Checked = true;
Code: Select all
TestSuite.Current.GetTestContainer("MyTest_01").Checked = true;
Re: How can I create a fail suite by turning passing scripts off in the .rxtst file?
Code: Select all
TestSuite.CurrentTestContainer