Forum Discussion

AndreiN1's avatar
AndreiN1
Occasional Contributor
7 years ago

Test case from java secure Pro case runner has failed, but junit output looks like it has passed.

Hello, 

 

One issue that i'm having is that I'm using the java approach to run the secure Pro test cases and an problem has occure.
When I run the junit , certain test cases fail, but the whole junit acts as it has passed. 

I do not know how to make the junit to act as if it has failed when there are test cases that have failed.

 

 

The second issue is that when I run the test from readyApi they pass, but when I run them from java case runner some of them have failed. I looked at different properties that have been set in ready api to make sure that they are uploaded to the test case runner and they have been loaded. I do not know where else to look for a solution

 

Please help me with these two issues.

Have a nice day,

Andrei N.

6 Replies

  • AndreiN1's avatar
    AndreiN1
    Occasional Contributor

    A little update, I am using the ready api maven plugin 1.9.0 as a dependency in my pom.

    I look at the difference between the test that have failed and those that pass. Aparently when I use invalid JSON types, JSON Boundary scan  and JSON Fuzzy scan the test fails from the terminal but when run from the readyApi application it passes. 

    Still the whole junit acts as it has passed when it has failed tests.

     

     

    • nmrao's avatar
      nmrao
      Champion Level 3
      Would you mind showing the respective code?
      • AndreiN1's avatar
        AndreiN1
        Occasional Contributor

        test

        public void test() {

             SoapUIProSecurityRunner runner = new CustomSecurityRunner();

         

            runner.setEndpoint(endpoint);

           // just load the properties need to run the test

           setupProperties(runner);

           runner.setProjectFile(pathToFile);

           runner.setPrinReport(true);

           runner.run();

        }

         

        The CustomSecurityRunner extends the SoapUIProSecurityRunner and overrides the printReport() and afterRun methods.

         

        Hope this helps