Ask a Question

How to enable ReadyAPI Events execution from command line

SOLVED
NewAutoTester
Contributor

How to enable ReadyAPI Events execution from command line

Hi Team,

We are using ReadyAPI 2.6.0 along with Cucumber 4.

 

We are using events in our project. When we execute test cases from the ReadyAPI application, the events are working as expected. However, when we start the project from command line via Cucumber, we notice that the events are not triggered.

 

Could you please explain how to trigger the events in ReadyAPI project from command line. 

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
nmrao
Community Hero

Re: How to enable ReadyAPI Events execution from command line

8 REPLIES 8
TanyaYatskovska
Community Manager

Re: How to enable ReadyAPI Events execution from command line

Hi @NewAutoTester,

 

Could you please run the ReadyAPI test via testrunner.bat? Specify the same command line parameters that you specify in Cucumber. Do you see the same behavior? 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
NewAutoTester
Contributor

Re: How to enable ReadyAPI Events execution from command line

Hi,

When we run the ReadyAPI test via testrunner.bat with default parameters we could see the events is triggered whereas from cucumber it does not.

testrunner.bat command used:

"C:\Program Files\SmartBear\ReadyAPI-2.6.0\bin\testrunner.bat" -sTestSuite1 "-cTestCase1" -r -a -j -f${WORKSPACE} "-RJUnit-Style HTML Report" -FXML "-EDefault environment" "C:\Users\<userID>\Soap UI\SoapUIProject"

Below are the commands that are used in cucumber to run the test cases.

 

WsdlProjectPro project = new WsdlProjectPro("src/test/resources/xml/SoapUIProject");
WsdlTestCase testCase = project.getTestSuiteByName("TestSuite1").getTestCaseByName("TestCase1");
WsdlTestCaseRunner runner = testCase.run(new PropertiesMap(), false);

 

Thank You.

 

Radford
Super Contributor

Re: How to enable ReadyAPI Events execution from command line

What event is it that is not running? The reason I ask is that from your command line, you are running a TestSuite, but in your code for cucumber you are just running a TestCase. Thus if you are expecting a TestSuite event to run I can understand why it doesn't if you just run the TestCase.

 

 

NewAutoTester
Contributor

Re: How to enable ReadyAPI Events execution from command line

We are having a event TestRunListener.afterStep when the test step fails there is some logging done in that event.

Olga_T
Moderator

Re: How to enable ReadyAPI Events execution from command line

Thanks Tanya and Radford for your replies!


@NewAutoTester, have you managed to find a solution?

Community, maybe is there anyone who has experience in work with Cucumber? Can you assist please?

Thanks in advance.

 


Olga Terentieva
SmartBear Assistant Community Manager

nmrao
Community Hero

Re: How to enable ReadyAPI Events execution from command line

TanyaYatskovska
Community Manager

Re: How to enable ReadyAPI Events execution from command line

Hi @NewAutoTester,

 

It looks like the article Rao has found should help you resolve the issue. Please let us know if you still need any more assistance.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
NewAutoTester
Contributor

Re: How to enable ReadyAPI Events execution from command line

Hi Tanya,

 

@rao -- Thank you for the infomation. 

 

We tried to use SoapUITestCaseRunner but it does not allow us to set TestCase property,so we are using WsdlProjectPro which does not trigger the SoapUI Events.

 

Regards. 

 

 

cancel
Showing results for 
Search instead for 
Did you mean: