Forum Discussion

SKoneru's avatar
SKoneru
Contributor
12 years ago

Capture test result files based on property set on teststep

Hi,

There is an option to capture the test results (-a) of all test steps and also default option to capture only the test steps that failed.
Now there is a situation that I need to capture test results only for some test steps(even in case of success or failure), I don't need to capture for all test steps. If I give -a option then all the test steps are captured. Which might quickly end-up in memory issue.

I don't think this scenario is addressed. If this is addressed then can someone explain how to do this. If not, then can we add this as feature enhancement?
  • You can run multiple testrunners, One with the teststeps you want to fail and one with the others.Unfortunately you cannot have both options in one when using testrunner. Let me know if you have further issues or questions.

    Regards,
    Temil
  • I think you got my question wrong. No matter whether the test fails or pass, I want to capture the test result(request/response message txt file) of only some test steps in a test case.
    For example, we have almost 25 test steps in each test case, of which I want to capture test results of few test steps, like itemid in AddItem API call, transactionid in GetOrders API call etc.
    But currently, if I set -a option(or <exportAll> is true) then the test results for all test steps are created and if I don't specify this option only failed test steps are captured.
    But I want to have control to say which test steps should be captured. How can I do that?
  • Hi,

    There is no way to be able to cherry-pick which test steps results to export. What you could do is have a groovy script that exports certain test step results to files, and have it choose which test steps to export through a passed property.

    Regards,
    Arian
    SmartBear Sweden
  • >>What you could do is have a groovy script that exports certain test step results to files,
    I will write a simple groovy script that stores the required information from the response of certain test steps to a file.

    >>and have it choose which test steps to export through a passed property.
    I didn't understand this statement. Can you elaborate.
  • What I meant is that you could have the groovy script choose which test steps to log depending on a property (e.g. a list of test step names), and then pass that property to SoapUI when running the project. Of course, that level of dynamicity might not be necessary - that's up to you. Does that make sense?

    Regards,
    Arian
    SmartBear Sweden