Forum Discussion

lydeeea's avatar
lydeeea
Occasional Contributor
3 years ago

Mass Test Case Import

Hello,

 

I have 1000+ test cases that I need to get into Ready API.  Is there an easy way to do this?  Right now we're doing it maually.

 

Thanks

 

  • mkrausem's avatar
    mkrausem
    3 years ago

    We use an Groovy-Script to import testsuite-xml-files into an project.

  • richie's avatar
    richie
    Community Hero
    Hey lydeeea,

    When you say you have 1000 tests that you want to import. How are these tests already saved?

    Ta

    Rich
  • KarelHusa's avatar
    KarelHusa
    Champion Level 1

    lydeeea ,

    it depends mainly on two things:

    • How are the input data structured and stored (as richie already pointed out)
    • How are the test cases diverse? Shall we transform the test input into ReadyAPI test cases the same way (for all test cases)? Or are there some differences? Higher diversity makes automation more difficult.
    • Would data driven tests fit this purpose? You can use couple of test cases which use large data sets as their inputs. This can be done pretty easilly in ReadyAPI.

     

    For simpler automation you can:

    • open a new project,
    • create a Groovy test step,
    • make a conversion script (read the input data and create test cases, test steps and assertions),
    • run the step and
    • check the results.

    In case it fails, you can return to your last version in git. Anyway using git is highly recommended for any ReadyAPI scripting, since you can destroy your project or reverting back might be too difficult. 

     

    For larger transformations you can use a programming IDE (e.g. IntelliJ IDEA), use the ReadyAPI SDK and do anything you need with the full support of the Java/Groovy IDE, use any libraries, tools, create the programs, test it etc. With such approach you create the ReadyAPI test projects automatically from scratch. We have used this approach when API definitions and test data changed so often, that we generated ReadyAPI test just before its execution (on the fly).

     

    Best regards,

    Karel

     

  • groovyguy's avatar
    groovyguy
    Community Hero

    If you're talking about Test Cases that you've exported from a project and have an XML test case by itself, I am not aware of any way to mass-import those into a new project/test suite. You might be able to put together a groovy script to do so, but that might present its own difficulties.

     

    • mkrausem's avatar
      mkrausem
      Occasional Contributor

      We use an Groovy-Script to import testsuite-xml-files into an project.