there were no requests sent during simulation

Ok, I can compile an run a test,however i’m missing some major aspect of testing as it doesn’t appear that i’m sending any requests during testing.

I get the following error after execution “there were no requests sent during simulation”

Script edited for descretion:

package PackageName
// IMPORT PACKAGES HERE
import io.gatling.core.Predef._
import io.gatling.core.session.Expression
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.Headers.Names._
import io.gatling.http.Headers.Values._
import scala.concurrent.duration._
import bootstrap._
import assertions._

class WebServiceRequest extends Simulation {
// DECLARE CONSTANTS HERE
// Declare Headers
val headers_1 = Map(“User-Agent” → “Apache-HttpClient/4.1.1 (java 1.5)”, “Accept-Encoding” → “gzip,deflate” )

//Declare Body of SOAP REQUEST
val myBody = “”"<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”>
soapenv:Header<wsse:Security soapenv:mustUnderstand=“1” xmlns:wsse=“http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd” xmlns:wsu=“http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd”><wsse:UsernameToken wsu:Id=“UsernameToken-1”>wsse:Usernameusername</wsse:Username>
<wsse:Password Type=“http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText”>password</wsse:Password><wsse:Nonce EncodingType=“http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary”>daffa+ddd==</wsse:Nonce>wsu:Created2014-01-29T16:14:04.315Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>
soapenv:Body
aaa:element
data
</aaa:element>
</soapenv:Body>
</soapenv:Envelope>"""

// Define the scenario below
val scn = scenario(“request”)
repeat(10)
{
exec(http(“WebService”)
.post(“http://url.com/endpoint”)
.headers(headers_1)
.body(StringBody(myBody)).asXML)
}

//Run the scenerio
setUp(scn.inject(rampRate(1 usersPerSec) to(1000 usersPerSec) during(2 minutes))).protocols(http)

}

Version: 2.0.0-M3a

Hi,

It’s looks like your missing a dot between scenario and repeat, it should be scenario(“request”).repeat{ … }

Cheers,

Pierre

That did it! Thanks!

You’re welcome !

Have fun with Gatling :wink: