# how to use foreach

**URL:** https://community.gatling.io/t/how-to-use-foreach/409
**Category:** Gatling (Open-Source)
**Created:** [June 4, 2013, 4:28pm UTC](https://community.gatling.io/t/how-to-use-foreach/409 "2013-06-04T16:28:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Zique\_Sousa](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zique\_Sousa](https://community.gatling.io/u/Zique_Sousa)
#### Post date: [June 4, 2013, 4:28pm UTC](https://community.gatling.io/t/how-to-use-foreach/409/1 "2013-06-04T16:28:53Z")

</div>

I have an section of my gatling script that I want to repeat about 30 times, I want have a counter for each time it loops and use that counter.

for example wnat to loop through the below code 30 times and use the counter to replace the day in the date.

.exec(http(“request\_40”)

.post(“[https://server1.com/userportal/trips/save](https://server1.com/userportal/trips/save)”)  
.headers(headers\_40)

.param(""“tripDay”"", “”“2013-05-DAY”"")

I am not sure I understand using .foreach

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [June 4, 2013, 4:38pm UTC](https://community.gatling.io/t/how-to-use-foreach/409/2 "2013-06-04T16:38:26Z")

</div>

foreach is for looping on a sequence attribute stored in the Session, for example, a list of links captured in a previous page with a regex.  
What you want is a simple repeat(30, “nameOfTheCounter”) {

…  
.param(""“tripDay”"", “”“2013-05-${nameOfTheCounter}”"")  
}

---

<div class="post-metadata">

### Author: ![Zique\_Sousa](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zique\_Sousa](https://community.gatling.io/u/Zique_Sousa)
#### Post date: [June 5, 2013, 5:39pm UTC](https://community.gatling.io/t/how-to-use-foreach/409/3 "2013-06-05T17:39:18Z")

</div>

yes that worked, thanks

---

<div class="post-metadata">

### Author: ![Zique\_Sousa](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zique\_Sousa](https://community.gatling.io/u/Zique_Sousa)
#### Post date: [June 6, 2013, 4:03am UTC](https://community.gatling.io/t/how-to-use-foreach/409/4 "2013-06-06T04:03:29Z")

</div>

sorry it didn’t work. I am using  
.repeat(2,“DAY”){  
exec(http(“request\_42”)  
.post(“[https://qa.crsinc.com/userportal/trips/save](https://qa.crsinc.com/userportal/trips/save)”)  
.headers(headers\_42)  
.param(""“id”"", “”"""")  
.param(""“commuteDistance”"", “”"""")  
.param(""“customFields[purpose]”"", “”“Visit to Everything Just A Buck ${DAY}”"")  
.param(""“distance”"", “”“0"”")  
)  
}

this always substitutes the value 0

---

<div class="post-metadata">

### Author: ![Zique\_Sousa](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zique\_Sousa](https://community.gatling.io/u/Zique_Sousa)
#### Post date: [June 6, 2013, 4:11am UTC](https://community.gatling.io/t/how-to-use-foreach/409/5 "2013-06-06T04:11:03Z")

</div>

this is my entire code  
package junk  
import com.excilys.ebi.gatling.core.Predef.\_  
import com.excilys.ebi.gatling.http.Predef.\_  
import com.excilys.ebi.gatling.jdbc.Predef.\_  
import com.excilys.ebi.gatling.http.Headers.Names.\_  
import akka.util.duration.\_  
import bootstrap.\_  
import assertions.\_

class junk extends Simulation {

val httpConf = httpConfig  
.baseURL(“[https://server1:443](https://server1:443)”)  
.acceptHeader(“image/png,image/_;q=0.8,_/\*;q=0.5”)  
.acceptEncodingHeader(“gzip, deflate”)  
.acceptLanguageHeader(“en-US,en;q=0.5”)  
.connection(“keep-alive”)  
.userAgentHeader(“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0”)

val headers\_1 = Map(  
“Accept” → “”“text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8"”",  
“Cache-Control” → “”“max-age=0"”"  
)

val headers\_2 = Map(  
“Accept” → “”“text/css,_/_;q=0.1"”",  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ec2-208a4-4ddf06a7579ff”"""  
)

val headers\_3 = Map(  
“Accept” → “”"_/_""",  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:55 GMT”"",  
“If-None-Match” → “”"“41b06-1faca-4ddf06a78ae4f”"""  
)

val headers\_4 = Map(  
“Accept” → “”"_/_""",  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ec3-a9c23-4ddf06a7585b7"”""  
)

val headers\_5 = Map(  
“Accept” → “”"_/_""",  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ec7-2211-4ddf06a75899f”"""  
)

val headers\_6 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c5-4da-4ddf06a73ff17"”""  
)

val headers\_7 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ecc-39d-4ddf06a75899f”"""  
)

val headers\_8 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ecd-e3b3-4ddf06a75899f”"""  
)

val headers\_9 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c2-4d4-4ddf06a73ff17"”""  
)

val headers\_10 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c7-acdf-4ddf06a73ff17"”""  
)

val headers\_11 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ecf-6df-4ddf06a75899f”"""  
)

val headers\_12 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407ee-39f8-4ddf06a741687"”""  
)

val headers\_13 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407eb-a50c-4ddf06a741687"”""  
)

val headers\_14 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c6-909-4ddf06a73ff17"”""  
)

val headers\_15 = Map(  
“Accept” → “”“text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“401ff-47e-4ddf06a6f3487"”""  
)

val headers\_16 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40325-19b3-4ddf06a73d807"”""  
)

val headers\_17 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:55 GMT”"",  
“If-None-Match” → “”"“4187a-333-4ddf06a78585f”"""  
)

val headers\_18 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40eca-734-4ddf06a75899f”"""  
)

val headers\_19 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:55 GMT”"",  
“If-None-Match” → “”"“418d7-152d-4ddf06a786417"”""  
)

val headers\_20 = Map(  
“Cache-Control” → “”“max-age=0"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:55 GMT”"",  
“If-None-Match” → “”"“418a4-303-4ddf06a78602f”"""  
)

val headers\_21 = Map(  
“Accept” → “”“text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8"”",  
“Cache-Control” → “”“no-cache”"",  
“Content-Type” → “”“application/x-www-form-urlencoded; charset=UTF-8"”",  
“Pragma” → “”“no-cache”"",  
“X-Requested-With” → “”“XMLHttpRequest”""  
)

val headers\_22 = Map(  
“Accept” → “”“text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8"”"  
)

val headers\_23 = Map(  
“Accept” → “”“text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8"”",  
“If-Modified-Since” → “”“Mon, 03 Jun 2013 08:58:40 GMT”""  
)

val headers\_24 = Map(  
“Accept” → “”“text/css,_/_;q=0.1"”",  
“If-Modified-Since” → “”“Mon, 03 Jun 2013 08:59:20 GMT”""  
)

val headers\_25 = Map(  
“Accept” → “”"_/_""",  
“If-Modified-Since” → “”“Mon, 03 Jun 2013 08:59:20 GMT”""  
)

val headers\_30 = Map(  
“If-Modified-Since” → “”“Mon, 03 Jun 2013 08:58:40 GMT”""  
)

val headers\_31 = Map(  
“Accept” → “”“application/json, text/javascript, _/_; q=0.01"”",  
“X-Requested-With” → “”“XMLHttpRequest”""  
)

val headers\_33 = Map(  
“Accept” → “”"_/_""",  
“X-Requested-With” → “”“XMLHttpRequest”""  
)

val headers\_42 = Map(  
“Accept” → “”"_/_""",  
“Cache-Control” → “”“no-cache”"",  
“Content-Type” → “”“application/x-www-form-urlencoded; charset=UTF-8"”",  
“Pragma” → “”“no-cache”"",  
“X-Requested-With” → “”“XMLHttpRequest”""  
)

val headers\_44 = Map(  
“Accept” → “”"_/_""",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:55 GMT”"",  
“If-None-Match” → “”"“41b06-1faca-4ddf06a78ae4f”"""  
)

val headers\_45 = Map(  
“Accept” → “”“text/css,_/_;q=0.1"”",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ec2-208a4-4ddf06a7579ff”"""  
)

val headers\_46 = Map(  
“Accept” → “”"_/_""",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ec3-a9c23-4ddf06a7585b7"”""  
)

val headers\_47 = Map(  
“Accept” → “”"_/_""",  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ec7-2211-4ddf06a75899f”"""  
)

val headers\_48 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ecf-6df-4ddf06a75899f”"""  
)

val headers\_49 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c5-4da-4ddf06a73ff17"”""  
)

val headers\_50 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ecc-39d-4ddf06a75899f”"""  
)

val headers\_51 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40ecd-e3b3-4ddf06a75899f”"""  
)

val headers\_52 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c2-4d4-4ddf06a73ff17"”""  
)

val headers\_53 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c7-acdf-4ddf06a73ff17"”""  
)

val headers\_54 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407ee-39f8-4ddf06a741687"”""  
)

val headers\_55 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407eb-a50c-4ddf06a741687"”""  
)

val headers\_56 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“407c6-909-4ddf06a73ff17"”""  
)

val headers\_57 = Map(  
“If-Modified-Since” → “”“Thu, 30 May 2013 14:35:54 GMT”"",  
“If-None-Match” → “”"“40325-19b3-4ddf06a73d807"”""  
)

val scn = scenario(“Scenario Name”)

.exec(http(“request\_1”)  
.get(“[https://server1/](https://server1/)”)  
.headers(headers\_1)  
)  
.pause(184 milliseconds)  
.exec(http(“request\_2”)  
.get(“[https://server1/resources/2b6c732475f91ffbb3899572fe8af89f.css](https://server1/resources/2b6c732475f91ffbb3899572fe8af89f.css)”)  
.headers(headers\_2)  
.check(status.is(304))  
)  
.exec(http(“request\_3”)  
.get(“[https://server1/scripts/prototype.js](https://server1/scripts/prototype.js)”)  
.headers(headers\_3)  
.check(status.is(304))  
)  
.exec(http(“request\_4”)  
.get(“[https://server1/resources/c07b311750fa627de90d4a5ef3f39337.js](https://server1/resources/c07b311750fa627de90d4a5ef3f39337.js)”)  
.headers(headers\_4)  
.check(status.is(304))  
)  
.pause(90 milliseconds)  
.exec(http(“request\_5”)  
.get(“[https://server1/resources/fcb9dbfd662b6128f2c6611a65a3fbfe.js](https://server1/resources/fcb9dbfd662b6128f2c6611a65a3fbfe.js)”)  
.headers(headers\_5)  
.check(status.is(304))  
)  
.pause(321 milliseconds)  
.exec(http(“request\_6”)  
.get(“[https://server1/layouts/marketing/img/corner4.gif](https://server1/layouts/marketing/img/corner4.gif)”)  
.headers(headers\_6)  
.check(status.is(304))  
)  
.pause(45 milliseconds)  
.exec(http(“request\_7”)  
.get(“[https://server1/resources/img/icons-sprite.gif](https://server1/resources/img/icons-sprite.gif)”)  
.headers(headers\_7)  
.check(status.is(304))  
)  
.exec(http(“request\_8”)  
.get(“[https://server1/resources/img/logo-with-header.jpg](https://server1/resources/img/logo-with-header.jpg)”)  
.headers(headers\_8)  
.check(status.is(304))  
)  
.exec(http(“request\_9”)  
.get(“[https://server1/layouts/marketing/img/corner1.gif](https://server1/layouts/marketing/img/corner1.gif)”)  
.headers(headers\_9)  
.check(status.is(304))  
)  
.pause(14 milliseconds)  
.exec(http(“request\_10”)  
.get(“[https://server1/layouts/marketing/img/hero.jpg](https://server1/layouts/marketing/img/hero.jpg)”)  
.headers(headers\_10)  
.check(status.is(304))  
)  
.pause(12 milliseconds)  
.exec(http(“request\_11”)  
.get(“[https://server1/resources/img/primary-btn-bg.gif](https://server1/resources/img/primary-btn-bg.gif)”)  
.headers(headers\_11)  
.check(status.is(304))  
)  
.pause(62 milliseconds)  
.exec(http(“request\_12”)  
.get(“[https://server1/layouts/marketing/img/nav-module-sprite.jpg](https://server1/layouts/marketing/img/nav-module-sprite.jpg)”)  
.headers(headers\_12)  
.check(status.is(304))  
)  
.exec(http(“request\_13”)  
.get(“[https://server1/layouts/marketing/img/nav-module-image-sprite.jpg](https://server1/layouts/marketing/img/nav-module-image-sprite.jpg)”)  
.headers(headers\_13)  
.check(status.is(304))  
)  
.pause(14 milliseconds)  
.exec(http(“request\_14”)  
.get(“[https://server1/layouts/marketing/img/footer-fade.gif](https://server1/layouts/marketing/img/footer-fade.gif)”)  
.headers(headers\_14)  
.check(status.is(304))  
)  
.pause(90 milliseconds)  
.exec(http(“request\_15”)  
.get(“[https://server1/favicon.ico](https://server1/favicon.ico)”)  
.headers(headers\_15)  
.check(status.is(304))  
)  
.exec(http(“request\_16”)  
.get(“[https://server1/images/glyphs/ribon\_serverinfo\_o.png](https://server1/images/glyphs/ribon_serverinfo_o.png)”)  
.headers(headers\_16)  
.check(status.is(304))  
)  
.pause(5)  
.exec(http(“request\_17”)  
.get(“[https://server1/scripts/ext-3.3.3/resources/images/default/form/text-bg.gif](https://server1/scripts/ext-3.3.3/resources/images/default/form/text-bg.gif)”)  
.headers(headers\_17)  
.check(status.is(304))  
)  
.exec(http(“request\_18”)  
.get(“[https://server1/resources/img/gadget-body-bg.gif](https://server1/resources/img/gadget-body-bg.gif)”)  
.headers(headers\_18)  
.check(status.is(304))  
)  
.exec(http(“request\_19”)  
.get(“[https://server1/scripts/ext-3.3.3/resources/images/default/panel/tool-sprites.gif](https://server1/scripts/ext-3.3.3/resources/images/default/panel/tool-sprites.gif)”)  
.headers(headers\_19)  
.check(status.is(304))  
)  
.pause(8)  
.exec(http(“request\_20”)  
.get(“[https://server1/scripts/ext-3.3.3/resources/images/default/grid/loading.gif](https://server1/scripts/ext-3.3.3/resources/images/default/grid/loading.gif)”)  
.headers(headers\_20)  
.check(status.is(304))  
)  
.pause(450 milliseconds)  
.exec(http(“request\_21”)  
.post(“[https://server1/system/login.php](https://server1/system/login.php)”)  
.headers(headers\_21)  
.param(""“username”"", “”“133873"”")  
.param(""“password”"", “”“1"”")  
.param(""“ajaxLogin”"", “”“1"”")  
)  
.pause(5)  
.exec(http(“request\_22”)  
.get(“[https://server1/system/](https://server1/system/)”)  
.headers(headers\_22)  
)  
.pause(768 milliseconds)  
.exec(http(“request\_23”)  
.get(“[https://server1/userportal/resources/images/favicon.ico](https://server1/userportal/resources/images/favicon.ico)”)  
.headers(headers\_23)  
.check(status.is(304))  
)  
.exec(http(“request\_24”)  
.get(“[https://server1/userportal/resources/css/userportal.css](https://server1/userportal/resources/css/userportal.css)”)  
.headers(headers\_24)  
.check(status.is(304))  
)  
.pause(94 milliseconds)  
.exec(http(“request\_25”)  
.get(“[https://server1/userportal/resources/js/userportal.js](https://server1/userportal/resources/js/userportal.js)”)  
.headers(headers\_25)  
.check(status.is(304))  
)  
.pause(54 milliseconds)  
.exec(http(“request\_26”)  
.get(“[https://server1/userportal/resources/fonts/proximanova-regular-webfont.woff](https://server1/userportal/resources/fonts/proximanova-regular-webfont.woff)”)  
.headers(headers\_23)  
.check(status.is(304))  
)  
.pause(416 milliseconds)  
.exec(http(“request\_27”)  
.get(“[https://server1/userportal/resources/fonts/proximanova-regular-webfont.woff](https://server1/userportal/resources/fonts/proximanova-regular-webfont.woff)”)  
.headers(headers\_23)  
.check(status.is(304))  
)  
.pause(25 milliseconds)  
.exec(http(“request\_28”)  
.get(“[https://server1/userportal/resources/fonts/crs.woff](https://server1/userportal/resources/fonts/crs.woff)”)  
.headers(headers\_23)  
.check(status.is(304))  
)  
.exec(http(“request\_29”)  
.get(“[https://server1/userportal/resources/fonts/proximanova-semibold-webfont.woff](https://server1/userportal/resources/fonts/proximanova-semibold-webfont.woff)”)  
.headers(headers\_23)  
.check(status.is(304))  
)  
.exec(http(“request\_30”)  
.get(“[https://server1/userportal/resources/images/crs-loader.gif](https://server1/userportal/resources/images/crs-loader.gif)”)  
.headers(headers\_30)  
.check(status.is(304))  
)  
.pause(20 milliseconds)  
.exec(http(“request\_31”)  
.get(“[https://server1/userportal/settings/person/current/userportal.mileage](https://server1/userportal/settings/person/current/userportal.mileage)”)  
.headers(headers\_31)  
.queryParam(""“startDate”"", “”“2013-06-05"”")  
.queryParam(""“endDate”"", “”“2013-06-06"”")  
)  
.pause(25 milliseconds)  
.exec(http(“request\_32”)  
.get(“[https://server1/favicon.ico](https://server1/favicon.ico)”)  
.headers(headers\_15)  
.check(status.is(304))  
)  
.pause(1)  
.exec(http(“request\_33”)  
.get(“[https://server1/userportal/async/status/personSyncJob](https://server1/userportal/async/status/personSyncJob)”)  
.headers(headers\_33)  
)  
.pause(25 milliseconds)  
.exec(http(“request\_34”)  
.get(“[https://server1/userportal/resources/images/icon-calendar.gif](https://server1/userportal/resources/images/icon-calendar.gif)”)  
.headers(headers\_30)  
.check(status.is(304))  
)  
.exec(http(“request\_35”)  
.get(“[https://server1/userportal/resources/images/pdficon.png](https://server1/userportal/resources/images/pdficon.png)”)  
.headers(headers\_30)  
.check(status.is(304))  
)  
.pause(42 milliseconds)

.exec(http(“request\_36”)  
.get(“[https://server1/userportal/period/favr/current](https://server1/userportal/period/favr/current)”)  
.headers(headers\_31)  
)  
.pause(25 milliseconds)

.exec(http(“request\_37”)  
.get(“[https://server1/userportal/settings/person/current/userportal.mileage](https://server1/userportal/settings/person/current/userportal.mileage)”)  
.headers(headers\_31)  
.queryParam(""“startDate”"", “”“2013-06-1"”")  
.queryParam(""“endDate”"", “”“2013-06-31"”")  
)  
.pause(25 milliseconds)  
.exec(http(“request\_38”)  
.get(“[https://server1/userportal/trips/list](https://server1/userportal/trips/list)”)  
.headers(headers\_31)  
.queryParam(""“startDate”"", “”“2013-06-01"”")  
.queryParam(""“endDate”"", “”“2013-06-31"”")  
)  
.pause(1)  
.exec(http(“request\_39”)  
.get(“[https://server1/userportal/resources/images/fallback\_bg\_navicon.png](https://server1/userportal/resources/images/fallback_bg_navicon.png)”)  
.headers(headers\_30)  
.check(status.is(304))  
)  
.pause(9)

.exec(http(“request\_40”)  
.get(“[https://server1/userportal/location/find](https://server1/userportal/location/find)”)  
.headers(headers\_33)  
.queryParam(""“address”"", “”“3300 Broadway St, Eureka, CA 95501, USA”"")  
.queryParam(""“day”"", “”“2013-06-01"”")  
.queryParam(""“maxResults”"", “”“5"”")  
)  
.pause(25 milliseconds)  
.exec(http(“request\_41”)  
.get(“[https://server1/userportal/resources/fonts/proximanova-regularitalic-webfont.woff](https://server1/userportal/resources/fonts/proximanova-regularitalic-webfont.woff)”)  
.headers(headers\_23)  
.check(status.is(304))  
)

.pause(6)  
.repeat(“2”,“DAY”){  
exec(http(“request\_42”)  
.post(“[https://server1/userportal/trips/save](https://server1/userportal/trips/save)”)  
.headers(headers\_42)  
.param(""“id”"", “”"""")  
.param(""“commuteDistance”"", “”"""")  
.param(""“customFields[purpose]”"", “”“Visit to Everything Just A Buck “””)  
.param(""“distance”"", “”“0"”")  
.param(""“sequenceNum”"", “”“1"”")  
.param(""“tripDay”"", “”“2013-06-${DAY}”"")  
.param(""“unit”"", “”“MILES”"")  
.param(""“toLocationAddress”"", “”“3300 Broadway St, Eureka, CA 95501, USA”"")  
.param(""“toLocationClientLocationId”"", “”“1007"”")  
.param(""“toLocationDataEntrySourceName”"", “”“browser”"")  
.param(""“toLocationDetectedMilliseconds”"", “”“1370460506342"”")  
.param(""“toEndDayStop”"", “”“false”"")  
.param(""“toLocationId”"", “”“1027"”")  
.param(""“toLocationIsGoogleVerified”"", “”“true”"")  
.param(""“toLocationLatitude”"", “”“40.779146"”")  
.param(""“toLocationLongitude”"", “”"-124.18738""")  
.param(""“toLocationName”"", “”“Everything Just A Buck”"")  
.param(""“toLocationPersonLocationId”"", “”“2092"”")  
.param(""“fromLocationAddress”"", “”“1615 Alexander Ln, Grants Pass, OR 97527, USA”"")  
.param(""“fromLocationDetectedMilliseconds”"", “”“1370460506342"”")  
.param(""“fromLocationId”"", “”“40980"”")  
.param(""“fromLocationIsGoogleVerified”"", “”“true”"")  
.param(""“fromLocationName”"", “”“Base Location”"")

)

.pause(6)  
}  
.exec(http(“request\_43”)  
.get(“[https://server1/userportal/logout](https://server1/userportal/logout)”)  
.headers(headers\_22)  
)  
.pause(714 milliseconds)  
.exec(http(“request\_44”)  
.get(“[https://server1/scripts/prototype.js](https://server1/scripts/prototype.js)”)  
.headers(headers\_44)  
.check(status.is(304))  
)  
.exec(http(“request\_45”)  
.get(“[https://server1/resources/2b6c732475f91ffbb3899572fe8af89f.css](https://server1/resources/2b6c732475f91ffbb3899572fe8af89f.css)”)  
.headers(headers\_45)  
.check(status.is(304))  
)  
.exec(http(“request\_46”)  
.get(“[https://server1/resources/c07b311750fa627de90d4a5ef3f39337.js](https://server1/resources/c07b311750fa627de90d4a5ef3f39337.js)”)  
.headers(headers\_46)  
.check(status.is(304))  
)  
.pause(76 milliseconds)  
.exec(http(“request\_47”)  
.get(“[https://server1/resources/fcb9dbfd662b6128f2c6611a65a3fbfe.js](https://server1/resources/fcb9dbfd662b6128f2c6611a65a3fbfe.js)”)  
.headers(headers\_47)  
.check(status.is(304))  
)  
.pause(310 milliseconds)  
.exec(http(“request\_48”)  
.get(“[https://server1/resources/img/primary-btn-bg.gif](https://server1/resources/img/primary-btn-bg.gif)”)  
.headers(headers\_48)  
.check(status.is(304))  
)  
.exec(http(“request\_49”)  
.get(“[https://server1/layouts/marketing/img/corner4.gif](https://server1/layouts/marketing/img/corner4.gif)”)  
.headers(headers\_49)  
.check(status.is(304))  
)  
.exec(http(“request\_50”)  
.get(“[https://server1/resources/img/icons-sprite.gif](https://server1/resources/img/icons-sprite.gif)”)  
.headers(headers\_50)  
.check(status.is(304))  
)  
.pause(11 milliseconds)  
.exec(http(“request\_51”)  
.get(“[https://server1/resources/img/logo-with-header.jpg](https://server1/resources/img/logo-with-header.jpg)”)  
.headers(headers\_51)  
.check(status.is(304))  
)  
.exec(http(“request\_52”)  
.get(“[https://server1/layouts/marketing/img/corner1.gif](https://server1/layouts/marketing/img/corner1.gif)”)  
.headers(headers\_52)  
.check(status.is(304))  
)  
.exec(http(“request\_53”)  
.get(“[https://server1/layouts/marketing/img/hero.jpg](https://server1/layouts/marketing/img/hero.jpg)”)  
.headers(headers\_53)  
.check(status.is(304))  
)  
.pause(47 milliseconds)  
.exec(http(“request\_54”)  
.get(“[https://server1/layouts/marketing/img/nav-module-sprite.jpg](https://server1/layouts/marketing/img/nav-module-sprite.jpg)”)  
.headers(headers\_54)  
.check(status.is(304))  
)  
.pause(13 milliseconds)  
.exec(http(“request\_55”)  
.get(“[https://server1/layouts/marketing/img/nav-module-image-sprite.jpg](https://server1/layouts/marketing/img/nav-module-image-sprite.jpg)”)  
.headers(headers\_55)  
.check(status.is(304))  
)  
.exec(http(“request\_56”)  
.get(“[https://server1/layouts/marketing/img/footer-fade.gif](https://server1/layouts/marketing/img/footer-fade.gif)”)  
.headers(headers\_56)  
.check(status.is(304))  
)  
.pause(81 milliseconds)  
.exec(http(“request\_57”)  
.get(“[https://server1/images/glyphs/ribon\_serverinfo\_o.png](https://server1/images/glyphs/ribon_serverinfo_o.png)”)  
.headers(headers\_57)  
.check(status.is(304))  
)  
.exec(http(“request\_58”)  
.get(“[https://server1/favicon.ico](https://server1/favicon.ico)”)  
.headers(headers\_15)  
.check(status.is(304))  
)

setUp(scn.users(1).protocolConfig(httpConf))  
}
