Forum Discussion
Sorry, there's no script access to those properties. You can add a feature request or vote for an existing one here:
https://community.smartbear.com/t5/TestComplete-Feature-Requests/idb-p/TestXCompleteFeatureRequests
It does affect the .mds file because that's where the property is stored. If you're concerned about any commit that you're about to make in git, you can always do a diff first.
- markre943 years agoOccasional Contributor
Marsha_R, thanks for the answer.
I need to have this property to be configurable by script. What are my options then?
1. Is it a way to have two .mds files for one project and switch it programmatically, then?
2. Or is it the way to reload .mds file after the script change via xml parsing?
I really have no idea how to tackle this problem.
- Marsha_R3 years agoModerator
Neither one of those is a good option.
You can try putting your Stop tests and Stop/Rerun tests in two different projects under one project suite. Then they would automatically have different .mds files.
Something else that might work is writing your own event handler for the ones you want to rerun and check for the failure yourself instead of letting TC handle it automatically.
- markre943 years agoOccasional Contributor
Marsha_R I would really want to avoid making seprate project in my test suite that would only differ with one parameter (hard for maintenance - 2 same code base).
So if I would choose writing my own event handler, how should I approach it? Let's say I've written a handler for OnStopTestCaseEvent https://support.smartbear.com/testcomplete/docs/reference/events/onstoptestcase.html since it's occurs after test case is executed and it's possible to retireve test case status. But I did not manage to find a help in the docs for telling the TestComplete that current test case should be rerun directly from the script.I've read about TestCase Object https://support.smartbear.com/testcomplete/docs/reference/program-objects/testcase/properties.html but I can only give an information about current item that is currently running, nothing more.
def general_events_on_stop_testcase(sender, stop_testcase_params): err_status = stop_testcase_params.Status if err_status == 2: # HOW TO RERUN TEST FROM HERE?
Related Content
- 4 years ago
- 6 years ago
- 10 years ago
Recent Discussions
- 4 hours ago
- 4 days ago