To enable a test case to use a proxy server named "bigbossproxy" on port 8080, two steps are needed:
First define the HTTP configuration in the model file:
<?xml version="1.0" encoding="UTF-8"?> <mmd:models xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:mmd="http://pineapple.dev.java.net/ns/module_model_1_0" xmlns:ifp="http://pineapple.dev.java.net/ns/plugin/infrastructure_1_0" > <mmd:model target-resource="infrastructure-test"> <mmd:content> <itp:infrastructure> <itp:http-configuration id="default-http-config" description="My default HTTP configuration" > <itp:proxy host="bigbossproxy" port="8080"/> </itp:http-configuration> </itp:infrastructure> </mmd:content> </mmd:model> </mmd:models>
The id default-http-config can be referenced from any number of test cases to trigger usage of the HTTP configuration including proxy server definition:
<?xml version="1.0" encoding="UTF-8"?> <mmd:models xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:mmd="http://pineapple.dev.java.net/ns/module_model_1_0" xmlns:itp="http://pineapple.dev.java.net/ns/plugin/infrastructure_1_0" > <mmd:model target-resource="infrastructure-test"> <mmd:content> <itp:infrastructure> <itp:http-configuration id="default-http-config" description="My default HTTP configuration" > <itp:proxy host="bigbossproxy" port="8080"/> </itp:http-configuration> <itp:load-balancing-test description="load-balancing-test for..." requests="5" http-configuration-ref="default-http-config" > <itp:urls> <itp:url>http://www.myhost.com</itp:url> <itp:url>http://www.myhost.com/login</itp:url> </itp:urls> <itp:assert> <itp:properties> <itp:property name="host" value="null" /> <itp:property name="environment" value="null" /> <itp:property name="location" value="null" /> </itp:properties> <itp:servers> <itp:server>null</itp:server> </itp:servers> </itp:assert> </itp:load-balancing-test> </itp:infrastructure> </mmd:content> </mmd:model> </mmd:models>