title: Running SoapUI test cases using testRunner
body: <p>I am working on a SoapUI project where I need to run my test suite using test runner. I am using external groovy scripting for environment variable. The problem I am facing here is whenever I am running test case from test runner its return Workspace as null, which is used in External groovy. So in external groovy I am getting workspace as null causing error [getProjectByname() cannot be invoked on null]. Below is the</p>
  
  <p><strong>constructor of global script where workspace is used</strong></p>
  
  <pre><code>    AvengerAPITestManager(String TestProject, String TestSuite, String TestCase,String TestStep)              
      {
          TestName = "AvengerAPITests";
          testProject = SoapUI.getWorkspace().getProjectByName(TestProject);
          tSuite = testProject.getTestSuiteByName(TestSuite);
          tCase = testProject.getTestSuiteByName(TestSuite).getTestCaseByName(TestCase);
          tStepName = TestStep.toString();
          tStep=testProject.getTestSuiteByName(TestSuite).getTestCaseByName(TestCase).getTestStepByName (TestStep);                  
      }
  </code></pre>
  
  <p>Above we have user SoapUI.getWorkspace() which is working fine when trying to run from soapUI but whever I m trying to run from testrunner SoapUI.getWorkspace comes out to be null. I even tried passing workspace like I am passing testproject name still it didnt worked.</p>
  
  <p><strong>I tried something like this also</strong></p>
  
  <pre><code>   AvengerAPITestManager(Object workspace,String TestProject, String TestSuite, String                  TestCase, String TestStep) 
     {
          TestName = "AvengerAPITests";
          testProject = workspace.getProjectByName(TestProject);
          tSuite = testProject.getTestSuiteByName(TestSuite);
          tCase = testProject.getTestSuiteByName(TestSuite).getTestCaseByName(TestCase);
          tStepName = TestStep.toString();
          tStep = testProject.getTestSuiteByName(TestSuite).getTestCaseByName(TestCase).getTestStepByName(TestStep);
     }
  </code></pre>
  
  <p>In the above code I tries passing Workspace object from the test case as I passed Testcase name and all but still I m getting null for workspace. Please tell me how do I deal with the problem.</p>