cancel
Showing results for 
Search instead for 
Did you mean: 

How do I cleanly reuse a testcase that requires input and output parameters in other testcases?

SOLVED
Highlighted
New Contributor

How do I cleanly reuse a testcase that requires input and output parameters in other testcases?

I'm trying to set up some test suites for a REST api using SoapUI NG Pro. I first need to login and retrieve the auth code, then pass that to the next step. 

 

I have suite1 with testcase login and:

  1. properties step for credentials
  2. POST login
  3. property transfer to save auth code returned by #2

This runs successfully by itself

 

Then I add suite2 with testcase get and:

  1. properties steps for test-specific credentials
  2. Run testcase (calling testcase login from suite1)
  3. GET product

This keeps pulling the credentials set in suite1 instead of suite2 and it fails.

 

In suite2 #2, how do I access and set the input (login creds) and output (auth code) parameters for the testcase being called? The properties are not listed when to create the "run testcase", unless i create custom parameters on suite1.

 

Can anyone recommend the corect way to do this? I can't seem to get the correct sequence of steps. I have already reviewed the Help docs and searched the community, and found no clear example to follow. Thanks.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: How do I cleanly reuse a testcase that requires input and output parameters in other testcases?

There were multiple causes. I needed to use custom properties and there was a bug that Support helped resolve. Problem solved. Thanks.

View solution in original post

4 REPLIES 4
Contributor

Re: How do I cleanly reuse a testcase that requires input and output parameters in other testcases?

How did you set up your testsuite 2?if you cloned testsuite1 the it wont work that well.I would recomend creating clean interface tests and create testsuite from that.

hope this helps

New Contributor

Re: How do I cleanly reuse a testcase that requires input and output parameters in other testcases?

The testsuite was not cloned

New Contributor

Re: How do I cleanly reuse a testcase that requires input and output parameters in other testcases?

Have you try setPropertyValue? You can put the value in different "Custom Property" level as you prefer.

New Contributor

Re: How do I cleanly reuse a testcase that requires input and output parameters in other testcases?

There were multiple causes. I needed to use custom properties and there was a bug that Support helped resolve. Problem solved. Thanks.

View solution in original post

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors