Forum Discussion

bwennekes's avatar
bwennekes
New Contributor
7 years ago

Version control and properties

Hello,

 

Currently I'm part of a team of testers working together on a single ReadyAPI composite project which is version controlled by SVN. To make merging as painless as possible we enabled options like ‘Pretty print project files’ and ‘Trim WSDL’.

 

One thing that is still a problem for us though, is the properties. In our case all properties (except on project level) are filled with run data, which changes every run. And every time we save the project all these changed properties are causing numerous of conflicts. This in turn makes merging a painfully slow process.

 

In our team we have discussed a (non-existing) option like “do not save properties” which can ideally be set at test step, -case, -suite and -project level. Which in our eyes is quite different from the “discard values on save” option. Discarding on save might be an alternative if the option was available on all levels. That is apart from the fact that we find it really annoying because you lose all run data every time you save. This might lead to rerunning the whole test project (which takes half an hour) every time you save, or collecting multiple changes before saving with the risk of losing them.

 

As our way of working does not seem very special we would like to hear if others are experiencing the same problems with properties and version control and how they are circumventing or tackling this.

 

Regards

1 Reply

  • StevenColon's avatar
    StevenColon
    SmartBear Alumni (Retired)

    Thank you for posting to our Community Forum.

     

    I am also interested in hearing how other users manage composite projects with multiple properties like bwennekes described.

     

    I suggest you post your ideas to improve the composite projects to our Feature Request forum so that users can vote on whether they agree that this would be a useful feature:

    https://community.smartbear.com/t5/ReadyAPI-Feature-Requests/idb-p/ReadyAPIFeatureRequests/tab/popular

     

    I have a possible solution that may mitigate some of the frustrations of the properties. You can check if it is worth using in your project.

     

    Here is a script that I wrote which will set every Property value on the Project, TestSuite, and TestCase level to a blank string. You can put this inside a groovy script of a disabled testcase and run it manually prior to each save.

     

     

    project = context.getTestCase().getTestSuite().getProject()

    testSuiteList = project.testSuiteList
    projectPropertyNames = project.getPropertyNames()
    if (projectPropertyNames.length >  0){
        for(propertyName in projectPropertyNames){
            project.setPropertyValue(propertyName, "")
        }
    }

    if(testSuiteList.size() > 0){
        for(testSuite in testSuiteList){
            testSuitePropertyNames = testSuite.getPropertyNames()
            //Clear All properties in TestSuite
            if (testSuitePropertyNames.length >  0){
                for(propertyName in testSuitePropertyNames){
                    testSuite.setPropertyValue(propertyName, "")
                }
            }
            
            testCaseList = testSuite.testCaseList
            if(testCaseList.size() > 0){
                for(testCase in testCaseList){
                    testCasePropertyNames = testCase.getPropertyNames()
                    //Clear all properties in TestCase
                    if(testCasePropertyNames.length >0){
                        for(propertyName in testCasePropertyNames){
                            testCase.setPropertyValue(propertyName, "")
                        }
                    }
                }
            }
        }
    }

     

    Let me know if you have any questions/concerns.

    Have a great day!