Running Test Cases from an External Shared Module
To run test cases from an external shared module, perform the following steps:
- Right-click the parent project in which the module is added as a POM dependency and select Run As > Maven Build.
- In the Edit Configuration wizard, configure the goals to achieve the following scenarios:
Scenarios Using Studio Using Command Line Run Test Cases from the External Shared Module that are added as POM dependencies
test -DrunESMTest=true mvn test -DrunESMTest=true Run Test Suites from the External Shared Module test -DrunESMTest=true -DESMtestSuiteName=”testSuite1.bwts” mvn test -DrunESMTest=true-DESMtestSuiteName="testSuite1.bwts" Run Multiple Test Suites from the External Shared Module test -DrunESMTest=true -DESMtestSuiteName=”testSuite1.bwts;testSuite2.bwts” mvn test -DrunESMTest=true-DESMtestSuiteName="testSuite1.bwts;testSuite2.bwts" Generate BusinessWorks Coverage report site -DrunESMTest= true mvn site -DrunESMTest=true
Limitation
If the Test Case from the External Shared Module fails while using the above mentioned method, you should import the Shared Module Project into the Workspace. Then change the fault data and publish it in the .m2
repository and run the test case again.
It is expected that you should test the External Shared Module while it is being developed, by creating a dummy application and adding the shared module dependency in it. Run the test goal on the parent project that can run the test cases from the Shared Module as well.