title: Set HTTP Header value in rest api using Groovy in SOAP UI
body: <p>I have a REST API project in SOAP UI which contains 20 test cases in a test suite. I want to add some header value and <code>sslkeystore</code> in every test step. Here is my code.  </p>
  
  <pre><code>import com.eviware.soapui.support.types.StringToStringMap
  
  testCaseList = testSuite.getTestCases()
           testCaseList.each
             {
               testCase = testSuite.getTestCaseByName(it.key)
               restTestSteps = testCase.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep)//only RestTestRequest steps
  
               restTestSteps.each
                {
                  it.getRestRequest().setHttpHeader("TEST2")
                  it.testRequest.setSslKeystore("**************")
  
                  }
               }
  </code></pre>
  
  <p>Above code "TEST2" contains the header value that I want to add to every test cases. I have configured TEST2 in ws-security configuration under outgoing ws-security configuration.
  But in above code I am getting following error:   </p>
  
  <blockquote>
    <p>groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.getRestRequest() is applicable for argument types: () values: [] Possible solutions: getTestRequest(), getHttpRequest()</p>
  </blockquote>
  
  <p>Anybody help me please how can I add header value  in every test steps. </p>