Forum Discussion

Lior_Kinsbruner's avatar
Lior_Kinsbruner
New Contributor
16 years ago

Need to run specific Test Step through JUNIT test

Hi,
I Need to run specific Test Step through JUNIT and I only saw a way to run a whole Test Case (which obviously has multiple test steps).

This is my code:
assertNotNull("Please set the SoapUI project file", soapUIProject);
        WsdlProject project = new WsdlProject(soapUIProject.getAbsolutePath());
        printProjectTestInfo(project);
        TestSuite testSuite = project.getTestSuiteByName(suiteName);

        TestCase testCase = testSuite.getTestCaseByName(caseName);
        testCase.addTestRunListener(this);

        // create empty properties and run synchronously
       
        TestRunner runner = testCase.run(new PropertiesMap(), false);
        Status status = runner.getStatus();

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    hmm.. maybe you could just disable all the other teststeps with testStep.setDisabled( true ) before running the testcase?

    regards,

    /Ole
    eviware.com