Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
16 years ago

testcase uniqure identifier

Hello,
We have build a customized reporting solution to keep track of test cases requirements etc.

In our solution, the testcase name in the database is used to report various stats for some particular test case.

However some times, QA Engineers rename testcases which in turn skews results since we treat it as a new test case to track whereas it is the same test case.

It would be very helpful if soapui generates some kind of GUID or any other identifier that is unique to each testcase. Maybe this can be a read-only property in the testcase properties. This way we can track based on some id rather test name.

If this can be done for test cases and testsuites that would help our solution.

Thanks

Ali

3 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Ali,

    actually this is already in the API, each modelItem has an id property which is a GUID that should not change over time. Please check it out to see if it works like you need.

    regards!

    /Ole
    eviware.com
  • alibaba82's avatar
    alibaba82
    Super Contributor
    so I have a project setup script where I would like to do the following.

    for each of the testcase in the project
    insert (test guid, testname, test description, test author, testsuite name, project name, reqirements name, requirementId, requirement description (if any) )

    into database.

    Can you help me with some code to this for loop.

    Thanks

    Ali
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    hmm.. how about something like

    def conn = ..create connection..
    def stmt = ..create prepared statement..

    for( testSuite in project.testSuiteList )
    {
        for( testCase in testSuite.testCaseList )
        {
            stmt.setXX( .., testCase.id )
            etc
            stmt.executeUpdate()
        }
    }

    conn.close()

    regards!

    /Ole
    eviware.com