leeasdf9
11 years agoFrequent Contributor
Possible to run an execution list of Testcomplete Project with Test Execute?
Dear Tanya, Dear Support Team, I just get started with testexecute 9 and would like to run the test complete projects with testexecute on our VMs. I did read article "Run an individual test item...
- 11 years ago
Hi, another option, which I have just implemented, is to wrap TestExecute as a COM object in a C# Class Library which also contains an XML file reader.
I can feed it an XML file such as the following
<?xml version="1.0" encoding="utf-8"?>
<tests>
<test type="ProjectItem">
<projectName>ProjectB</projectName>
<projectItemName>ODT</projectItemName>
</test>
<test type="Project">
<projectName>ProjectB</projectName>
</test>
<test type="ProjectTestItem">
<projectName>ProjectA</projectName>
<projectTestItem>ProjectTestItem3</projectTestItem>
</test>
<test type="RoutineEx">
<projectName>ProjectB</projectName>
<unitName>Unit2</unitName>
<routineName>testWithParameter</routineName>
<parameters signature="source,destination">
<parameter name="source">thesource</parameter>
<parameter name="destination">thedestination</parameter>
</parameters>
</test>
<test type="Routine">
<projectName>ProjectA</projectName>
<unitName>Unit2</unitName>
<routineName>testUnit2</routineName>
</test>
<test type="Suite">
<projectName></projectName>
</test>
<test type="TestByName">
<projectName>ProjectB</projectName>
<testName>KeywordTests|KeywordTestUnit</testName>
</test>
</tests>
and the XML file reader reads this file and uses a TestExecute COM object to execute each test based on the attributes and elements of each <test>.
It took me ~1.5 days to write something that works, I just have a few Exception scenarios to code in so your friendly neighbourhood developer should be able to whip something up pretty quick.
For mine, this is a lot nicer and cleaner than working with batch files and the TestExecute command line limitations.
Regards,
Phil Baird