Forum Discussion

tech321's avatar
tech321
Contributor
6 years ago

Tag in ReadyApi

Can any one please explain how the tags work in readyApi, when you run from commandline, testrunner.bat. I can not use what is written in the documentation https://support.smartbear.com/readyapi/docs/soapui/running/automating/cli.html#_ga=2.197920108.2145816237.1553073610-857303722.1547120448.

I have testSuites and testCases, some of them taget and some not. Let us say testSuite1 has tag 'regressionTest', testSuite2 has tag 'unitTest' and testSuite3 has tag 'smokeTest'. How should I write on the commandline if I only want to run the testSuite tagged with 'regressionTest'. I have tried 

>testrunner.bat -f"%WORKSPACE%\output1" -FPDF -j "%WORKSPACE%\my_project" -T"TestSuite regressionTest"

but I still get the whole project run. I appreciate your answer.

And what does this mean? 

The specified tags must be assigned to the test cases and test suites that you specify by using the -s and -c arguments. Otherwise, there will be no tests to execute.

Do I need to write every testsuite with -s and every testcase with -c before I can use the Tag? Please any noe can explain?

  • Yeah, I spotted the inconsistency in the documentation as well, I took it to mean that either was is OK.

     

    Did you try using the TestRunner GUI to generate the command line?

  • Hi Radford

    Finally it worked by using TestRunner GUI to generate the command line. Then I copied the generated cmdline to the cmdline and it worked with "-TTestCase regressionTest". Thank you very much for the idea :) 

     

    Regards

    Ranj

  • Radford's avatar
    Radford
    Super Contributor

    If you are unsure of how to create the command line for TestRunner.bat have you tried using the TestRunner GUI to geterate your command line for you? The documentation is here:

     

    https://support.smartbear.com/readyapi/docs/soapui/running/automating/gui.html

     

    The one thing that I spotted was that the documentaion has the project specified after all of the arguments, in your example it is not. Try:

     

    testrunner.bat "-f%WORKSPACE%\output1" -FPDF -j -T"TestSuite regressionTest" "%WORKSPACE%\my_project" 

     

     

    Note: I have not tested this so I recommend that you use the GUI linked above.

    • tech321's avatar
      tech321
      Contributor

      Thanks , I have tried with both 

      testrunner.bat "-f%WORKSPACE%\output1" -FPDF -j -T"TestSuite regressionTest" "%WORKSPACE%\my_project" 

      and 

      "-TTestSuite regressionTest"

      None of them works. By that I mean no test is excuted now. The documentation is abit confusing. It says:

      Usage: -T"<Test Item> <Tags>", where:

      then it says :

      "-TTestSuite Tag1 && !Tag2" "-TTestCase Tag3 || Tag4"

      That is why I have tried both -T" and "-T ... no test is excuted now.

       

      and by the way I use ReadyApi 2.4

      • Radford's avatar
        Radford
        Super Contributor

        Yeah, I spotted the inconsistency in the documentation as well, I took it to mean that either was is OK.

         

        Did you try using the TestRunner GUI to generate the command line?