Forum Discussion

ripplegupta's avatar
ripplegupta
Contributor
9 years ago

How to get reporting at test step level instead of test case level what surefire currently provides

I am running my test via jenkins and i have surefire plugin which generates xml reports in my workspace.

But this report has run status of all test suites and all test cases.

Each test case will have failed test step information too.

 

I want a way by which i can have run status of each test step whether failed or passed.

 

Can some one help here if we can do this with surefire plugin or with some other way/plugin.

 

Thanks a lot.

    • ripplegupta's avatar
      ripplegupta
      Contributor

      Hi Tanya, 

       

      Definitely i am using 4-5 assertions in each test step and based on those assertions my test steps are declared passed or failed.

       

      But when i fetch my test report from surefire plugin it shows me arrays of test cases only with status as passed or failed.

       

      Failed ones has error details for all failed test steps that caused that test case to be failed.

       

      Here in my sure fire test report i want all test steps details showing pass and fail.

       

      Is it possible with surefire report plugin or some way else.

       

      Thanks a lot.

      • JKambli's avatar
        JKambli
        Staff

        If you would like to know each assertion status,

         

        for (suite in testRunner.testCase.testSuite.project.getTestSuiteList()){
        for (test1 in suite.getTestCaseList()){
        for (i in test1.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep )){
        for( assertion in i.assertionList )
        {
        log.info "Assertion [" + assertion.label + "] has status [" + assertion.status + "]"
        }
        }
        }
        }