Forum Discussion

singhtester's avatar
singhtester
Contributor
12 years ago

teardown/Setup script for Suite & Test level NOT running

Hi Guys,

Can anyone suggest ,Why my teardown/Setup script for Suite & Test level works fine from GUI, & NOT from command prompt.

Suite runs as expected but none of the script statement gets executed.I am doing pre test verification & port tests verifications in setup & teardown script.

Is it some thing I am missing.If this is a limitation(which looks most probably not), I might need to add those in groovy script & run.

Thanks,

2 Replies

  • brainiac007's avatar
    brainiac007
    Occasional Contributor
    Hi,
    I'm not sure if I get your problem. Can you post the script?
  • Hi,

    Just to explain the query:

    Below scripts I have placed under "Setup Script" tab for Pre Suite run to delete the old Result folder & create a new one, where all my suite results will get saved.

    these script works fine, If I run suite using GUI.but when I run my suite from command line, these same lines does not gets executed.

    ====================================================
    groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
    holder = groovyUtils. getProjectPath()

    //Delete OLD resultfile and create New result file for New REST test run
    wasDelated = new File(holder + "/Results").deleteDir()
    wasDeleted = new File(holder + "/Results").mkdir()
    ====================================================

    Similarly, I have few scripts for post suite run, in "teardown" tab.again those works fine from GUI, but from command Line does not runs.

    Thanks