What product/components do you use and which version/fix level?
I am using below products:
Integration Server: 10.7
webMethods Unit Test Framework
What are trying to achieve? Please describe in detail.
I have tried executing test cases using run-composite-runner.xml ant build’s “composite-runner-all-tests” target.
The execution is smooth and I am getting necessary results.
Now I am trying to find a way to execute specific TestSuite or a specific Test case using ant build commands.
I have tried going through the run-composite-runner.xml but I do not see anything that can be tweaked or passed in as an input to ant command.
Can you please suggest how can I approach this.
Note: Individual test suite execution via designer is fine, but I am looking for headless way of executing specific test suite / test case.
Do let me know if you need any more details.
webMethods Unit Test Framework Help documentation [page: 51] has this detail with which single TestSuite can be executed through Test Suite Executor.
However to execute single test, other tests in the Suite need to be disabled as there are no direct ways to specify a single/multiple test(s) as of now.
Unit Test Framework 10.7 documentation (softwareag.com)
Configuring a Test Suite Executor
2. Modify the properties file, run-test-suites.properties to specify project locations and setting up target Integration Server definition.
It executes specific and multiple Test Suite files by specifying it in the following format:
Thank you for the response.
I will add more details to the solution I am trying to achieve.
What I am trying to do is, integrate Unit Test Execution in a CICD pipeline. This pipeline will also have ability to execute specific test cases, by getting it as input ( at the moment from user ).
For Example: There are failures in few test cases, and dev team wish to execute those specific test cases from the Jenkins build.
In this scenario, making changes to run-test-suites.properties file everytime will be difficult. Plus it will not allow simultaneous executions of individual test suites by multiple developers.
Thus I am looking for a way to achieve this via ant command.
If this is achieved, I will be able to execute individual test suites without requiring frequent changes to .properties file
Also multiple developers can execute the individual test suites simultaneously, if they have to.
I could suggest to have a look at this video where Test Suites are executed using Test Suite Executor and Jenkins pipeline. Run a Unit Test Framework Test Suite in Headless Mode & View Reports | webMethods | Software AG - YouTube
Values in run-test-suites.properties would be overridden by values passed through Jenkins pipeline while invoking the job. That means, user can always have some kind of choice parameter set in the job to choose TestSuites before executing the pipeline.
Thanks, that video helped me to get a direction in this. Specially if I pause video at 3:18, I can see how ant command can be extended to override the project properties.
I tried multiple combinations of parameter -DwebMethods.test.setup.location, but haven’t managed to get it running.
When I try the absolute path to the parent folder of the Test Suite xml, I end up getting an error with pipeline file paths.
I think this was anyway a wrong way.
I also tried using option to execute specific test suite using combination of absolute and relative path as per documentation.
but it somehow does not recognizing it properly and ends up executing all the test cases in my project.
Note: In above image, if we change the semicolon to a slash, it would be a proper path to my test suite xml file.
Another thing to notice is, I am maintaining the test suite projects outside of IS packages and outside of IS installation.
Can you please help me understand few things about these paths.
$AbsoluteProjectLocation1 ; $RelativeTestSuitePath1
What exactly is this path? Should this be folder of Test Suite Java project including the project name folder?
I understand that this is path to TestSuite.xml file, but when we say it is relative path, it is relative to what ?
Let me know if you need more details.
Please have a look at the shared example once. If SampleTestSuite is the I.S. package or a Java project (containing Test Suites) from checked out Git working directory i.e. outside product installation, then you can specify in respective patterns given in above example.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.