Forum Discussion

_Oliver_'s avatar
_Oliver_
Contributor
6 years ago

Cannot open some test suites

Hi, I am using ReadyApi 2.7.0 with a SoapUI Pro license. The following occurs in the SoapUI Pro tab. I have several projects opened and each project contains several test suites. Usually, if I do...
  • krogold's avatar
    krogold
    5 years ago

    LATEST UPDATE :

    If anyone needs it, I found a problem in some of my testSuites and, correcting it, I solved my problem of testSuite selection.

     

    My testSuites have tags, so do many of my testcases.

    I had a major problem due to not be able selecting testSuites : I couldn't set tags to my new testcases, so I decided to do it programmatically.

    I parse all my testsuites and testcases to check those which didn't have a tag in order to set one programmatically.

    I discovered that some of my testCases had a 'null' tag in their tags list (? I don't know how I managed to do this, maybe by removing a tag at project level ?)

     

    So I programmatically removed the null tag from the testcases which had it and assigned a new tag the same way.

     

    After doing this, I can now select my testsuites again. I guess that those spurious 'null' tags were messing up all my testsuites.

    Here is the groovy script I used :

    project = testRunner.testCase.testSuite.project
    
    project.getTestSuiteList().each{
    	suite ->
    	if (suite.getTagIds().size() != 0)
    	{
    		suite.getTestCaseList().each{
    			testcase ->
    			 tags_list = testcase.getTagIds()
    			
    			 if (tags_list.contains(null))
    			 {
    			 	// null tag ? remove it
    			 	testcase.removeTag(null)
    			 }
    		}
           }
    }

    Hope this helps

    _Oliver_ , you might be interested