Forum Discussion

searay60's avatar
searay60
Occasional Contributor
13 years ago

'Globally" change passwords in all test cases when cloning

I'm working with two Oracle instances (Test and Production) and they have different passwords so I have created two Soap UI projects; Test and Production. I have a Soap test suite of 200 test cases (with many assertions) that I need to periodically clone from Test (where I make changes, additions, etc) to Prod to then run the test suite. The problem is, after cloing from Test to Prod, I have to change the password in all 200 cases to the Prod passwrod. Is there a way to automatically or 'globally' change the password for all 200 test cases to the Prod password when I clone the Test test suite to the Prod test suite? Thank you for your time and assistance.

4 Replies

  • tjdurden's avatar
    tjdurden
    Frequent Contributor
    Hi searay60,

    How about creating a global property (TestSuite -> Custom Properties) and then just changing that when you clone the project? Within the test case, you just need to use a replacer to point at the property.

    Kind regards,
    Tim
  • Hi searay60,

    Switch between environment is very simply in SOAPUI, we dont need to clone any request or testsuite.

    Follow the below steps to switch between environment.

    step 1 : Double click on ur project request component.
    Step 2 : move to service Endpoints tab and add the environment details (endpoint, username, password, wss-type and domain if any)
    step 3 : select the environment(test or production - in ur case) and click Assign button. It will open one pop-up, select "All Test Request" option.

    Hope it will help.

    Thanks & Regards
    Saravanan Ramamoorthy
  • searay60's avatar
    searay60
    Occasional Contributor
    Thank you both. Saravanan, I added the endpoints, username, password and WSS-Type. I run the test suite in the Test environment and get what I expect. When I go to the service endpoints tab and select the Production environment (it becomes highlighted in blue) and run the test suite I do not get what I expect. It's returning the Test environment results. A test that should return a Prod result is still returning the Test enviroment result.
    Adding all the endpoints to the project request component does not change the endpoint of the individual tests. How does this work? Thank you.
  • searay60's avatar
    searay60
    Occasional Contributor
    Saravanan, I did get the result I need. I did not follow your instructinos the first time... then I selected All Test Request and it works fine. It may not be exactly what we want but it is better than cloning and maintaning separate test scenarios. thank you