gibsonman507's avatar
gibsonman507
Occasional Visitor
6 years ago
Status:
Implemented

Don't prepend "Copy of" if the target testcase is different

When cloning multiple test steps, there is no dialog to name each of the cloned test cases. ReadyAPI prepends "Copy of <teststep>" and this it becomes very tedious to rename each test step. 

 

I understand the purpose of prepending Copy of is so there's no duplicates within the same test case. My only request is that if the target test case for the cloned steps is different (therefore no need to make a unique identifier), that they simply clone as-is.

 

IF there happens to be a test step with a conflict name in the target test case then it should be ok to auto prepend "Copy of".

 

This would save lots of time when I clone 25 or so steps

4 Comments

  • Yes, it will be nice if this idea got implemented as it will save a lot of time.

  • nmrao's avatar
    nmrao
    Champion Level 3

    Saw this question recently. Was thinking if it can be done something to this.

     

    Came up with below solution. And the details below::

     

    - SoapUI allows the customization for different actions.

    - User can write own library to different actions.

    - In this case, user is cloning a test step, Searched for "CloneTestStepAction" in github

    - There are two matches.

    -- one file is Java. Search for "Copy of", there are couple of references. If you feel no need of that string, Have your class, say "CustomCloneTestStepAction", use same code from original class, remove unwanted "Copy of". Compile and create jar file. Place it under READYAPI_HOME/bin/ext directory. Say this new class is in package "org.nmrao.soapui.actions" (of course, you can have your own package. But this is used in next point.

    -- another file xml. Search for "CloneTestStepAction", copy that entry, but replace the class name with your class. Create a simple xml file as below, say custom-actions.xml

     

    <?xml version="1.0" encoding="UTF-8"?>
    <tns:soapui-actions xmlns:tns="http://eviware.com/soapui/config">
        <tns:action id="CloneTestStepAction"
                    actionClass="org.nmrao.soapui.actions.CustomCloneTestStepAction"/>
    </tns:soapui-actions>

    Copy the above file under READYAPI_HOME/bin/actions

     

    Restart the tool.

     

    Time to test.

    When you press F9 key for a test step, you won't see the prefix "Copy of" any more as you removed it in the custom class.

     

    Similarly, actions can be implemented for Test Case, Test Suite cloning.

     

    If you want the default behaviour back, it's simple, remove the jar file, and xml file from the above locations.

     

    NOTE that above works fine for the Open Source and not sure on the Pro (in case if there is different class used for the readyapi), you can try though

     

    Could try this because of SoapUI is Open Source.