Marc,

 

This works.  Thanks.

 

A follow-up question though: if I run this through grails (grails run-webtest), the config properties are picked up from the webtest.properties, and the values specified in that file are the following:

 

webtest_host                = qa.abc.com

webtest_port                = 80

webtest_protocol            = http

 

# uncomment to override default

webtest_basepath            = /

 

webtest_summary             = true

webtest_saveresponse        = true

webtest_resultpath          = webtest/reports

webtest_resultfile          = WebTestResults.xml

webtest_haltonerror         = false

webtest_errorproperty       = webTestError

webtest_haltonfailure       = false

webtest_failureproperty     = webTestFailure

webtest_showhtmlparseroutput= true

 

How do I keep the above properties, but just change the header tag, because the config_map has to be initialized from scratch.  If I were better at groovy, I guess it could have been done, but right now, I’m just a beginner.

 

Sanju.

 

*****************

Date: Mon, 27 Mar 2006 23:09:08 -0800 (PST)

From: Marc Guillemot <[EMAIL PROTECTED]>

To: [email protected]

Subject: Re: [Webtest] how to change user-agent inside groovy code

Reply-To: [email protected]

 

 

Hi Sanju,

 

I've never tested it but normally with a builder it should be something

like:

 

ant.testSpec(name: 'groovy: Test Groovy Scripting at creation time')

{

  config(config_map)

  {

    header(name: 'User-Agent', value: 'what you want')

  }

  steps()

  {

     ...

  }

}

 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.3/295 - Release Date: 3/28/2006

Reply via email to