ギャングツールを使用しています。最初は、サービスにログインする必要があります。私は "login.salesforce.com"にログインしようとしています。Gatlingを使用してログインできません
これは私のスカラーコードです。私はログインできません。私が間違っているところを案内してください。
package default
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.core.Predef._
class requestUser extends Simulation { \t
\t
\t val httpProtocol = http.baseURL("http://login.salesforce.com")
\t
\t val headers_1 = Map(
\t \t "Accept" -> "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
\t \t "Accept-Encoding" -> "gzip, deflate",
\t \t "Cache-Control" -> "no-cache",
\t \t "Origin" -> "https://testingapp-dev-ed.my.salesforce.com",
\t \t "Pragma" -> "no-cache",
\t \t "Upgrade-Insecure-Requests" -> "1")
\t val headers_2 = Map(
\t \t "Accept" -> "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
\t \t "Cache-Control" -> "no-cache",
\t \t "Pragma" -> "no-cache",
\t \t "Upgrade-Insecure-Requests" -> "1")
\t val Test = exec(http("request 1")
\t \t \t \t \t .get("/?stbdtimeout=1&login_hint=opareshbhai%40steelbrick.com")
\t \t \t \t \t .headers(headers_2))
\t \t \t .exec(http("Login")
\t \t \t \t \t \t .post("/")
\t \t \t \t \t \t .headers(headers_1)
\t \t \t \t \t \t .formParam("pqs", "%3Fstbdtimeout%3D1%26login_hint%3Dabcd%2540steelbrick.com")
\t \t \t \t \t \t .formParam("un", "abcd%40gmail.com")
\t \t \t \t \t \t .formParam("width", "1536")
\t \t \t \t \t \t .formParam("height", "960")
\t \t \t \t \t \t .formParam("hasRememberUn", "true")
\t \t \t \t \t \t .formParam("startURL", "")
\t \t \t \t \t \t .formParam("loginURL", "")
\t \t \t \t \t \t .formParam("loginType", "")
\t \t \t \t \t \t .formParam("useSecure", "true")
\t \t \t \t \t \t .formParam("local", "")
\t \t \t \t \t \t .formParam("lt", "standard")
\t \t \t \t \t \t .formParam("qs", "r%3Dhttps%253A%252F%252Flogin.salesforce.com%252F")
\t \t \t \t \t \t .formParam("locale", "")
\t \t \t \t \t \t .formParam("oauth_token", "")
\t \t \t \t \t \t .formParam("oauth_callback", "")
\t \t \t \t \t \t .formParam("login", "")
\t \t \t \t \t \t .formParam("serverid", "")
\t \t \t \t \t \t .formParam("display", "page")
\t \t \t \t \t \t .formParam("username", "abcd%40gmail.com")
\t \t \t \t \t \t .formParam("ExtraLog", "%255B%257B%2522width%2522%3A1536%257D%2C%257B%2522height%2522%3A960%257D%2C%257B%2522language%2522%3A%2522en-US%2522%257D%2C%257B%2522offset%2522%3A-5.5%257D%2C%257B%2522scripts%2522%3A%255B%257B%2522size%2522%3A249%2C%2522summary%2522%3A%2522if%2520%28self%2520%3D%3D%2520top%29%2520%257Bdocument.documentElement.style.v%2522%257D%2C%257B%2522size%2522%3A568%2C%2522summary%2522%3A%2522var%2520SFDCSessionVars%3D%257B%255C%2522server%255C%2522%3A%255C%2522https%3A%2F%2Flogin.sales%2522%257D%2C%257B%2522url%2522%3A%2522https%3A%2F%2Ftestingapp-dev-ed.my.salesforce.com%2Fjslibrary%2FSfdcSessionBase198.js%2522%257D%2C%257B%2522url%2522%3A%2522https%3A%2F%2Ftestingapp-dev-ed.my.salesforce.com%2Fjslibrary%2FLoginHint198.js%2522%257D%2C%257B%2522size%2522%3A26%2C%2522summary%2522%3A%2522LoginHint.hideLoginForm%28%29%3B%2522%257D%2C%257B%2522size%2522%3A36%2C%2522summary%2522%3A%2522LoginHint.getSavedIdentities%28false%29%3B%2522%257D%2C%257B%2522url%2522%3A%2522https%3A%2F%2Ftestingapp-dev-ed.my.salesforce.com%2Fjslibrary%2Fbaselogin2.js%2522%257D%2C%257B%2522url%2522%3A%2522https%3A%2F%2Ftestingapp-dev-ed.my.salesforce.com%2Fjslibrary%2FLoginMarketingSurveyResponse.js%2522%257D%2C%257B%2522size%2522%3A397%2C%2522summary%2522%3A%2522function%2520handleLogin%28%29%257Bdocument.login.un.value%3Ddoc%2522%257D%255D%257D%2C%257B%2522scriptCount%2522%3A9%257D%2C%257B%2522iframes%2522%3A%255B%2522https%3A%2F%2Fc.salesforce.com%2Flogin-messages%2Fpromos.html%3Fr%3Dhttps%25253A%25252F%25252Flogin.salesforce.com%25252F%2522%2C%2522https%3A%2F%2Flogin.salesforce.com%2Flogin%2Fsessionserver190.html%2522%255D%257D%2C%257B%2522iframeCount%2522%3A2%257D%255D")
\t \t \t \t \t \t .formParam("pw", "***********")
\t \t \t \t \t \t .formParam("Login", "Log+In")
\t \t \t \t \t \t .check(status.is(200), status.not(401))
\t \t \t \t \t)
\t \t \t \t \t \t .pause(5)
\t \t \t \t .exec(http("set")
\t \t \t \t \t \t \t .get("/setup/forcecomHomepage.apexp?setupid=ForceCom")
\t \t \t \t \t \t \t .headers(headers_2)
\t \t \t \t \t \t \t .check(currentLocation.is("https://google.com"))
\t \t \t \t \t \t \t
\t \t \t \t \t \t)
\t \t \t \t var scn = scenario("scn").exec(Test)
\t setUp(
\t \t scn.inject(atOnceUsers(1))
\t \t).protocols(httpProtocol)
}
&これは私のログファイルです:あなたはログインなぜあなたのことではありません.That "http://www.google.comを" ログインに期待している理由
Simulation default.requestUser started...
================================================================================
2016-04-04 12:36:39 0s elapsed
---- scn -----------------------------------------------------------------------
[ ] 0%
waiting: 1 /active: 0 /done:0
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
================================================================================
================================================================================
2016-04-04 12:36:44 5s elapsed
---- scn -----------------------------------------------------------------------
[--------------------------------------------------------------------------] 0%
waiting: 0 /active: 1 /done:0
---- Requests ------------------------------------------------------------------
> Global (OK=4 KO=0 )
> request 1 (OK=1 KO=0 )
> request 1 Redirect 1 (OK=1 KO=0 )
> Login (OK=1 KO=0 )
> Login Redirect 1 (OK=1 KO=0 )
================================================================================
12:36:48.638 [WARN ] i.g.h.a.AsyncHandlerActor - Request 'set' failed: currentLo
cation.find.is(https://google.com), but actually found http://login.salesforce.c
om/setup/forcecomHomepage.apexp?setupid=ForceCom
================================================================================
2016-04-04 12:36:48 9s elapsed
---- scn -----------------------------------------------------------------------
[##########################################################################]100%
waiting: 0 /active: 0 /done:1
---- Requests ------------------------------------------------------------------
> Global (OK=4 KO=1 )
> request 1 (OK=1 KO=0 )
> request 1 Redirect 1 (OK=1 KO=0 )
> Login (OK=1 KO=0 )
> Login Redirect 1 (OK=1 KO=0 )
> set (OK=0 KO=1 )
---- Errors --------------------------------------------------------------------
> currentLocation.find.is(https://google.com), but actually foun 1 (100.0%)
d http://login.salesforce.com/setup/forcecomHomepage.apexp?set...
================================================================================
Simulation finished
Parsing log file(s)...
Parsing log file(s) done
Generating reports...
================================================================================
---- Global Information --------------------------------------------------------
> request count 5 (OK=4 KO=1 )
> min response time 347 (OK=356 KO=347 )
> max response time 2331 (OK=2331 KO=347 )
> mean response time 877 (OK=1009 KO=347 )
> std deviation 758 (OK=794 KO=0 )
> response time 50th percentile 421 (OK=676 KO=347 )
> response time 75th percentile 931 (OK=1281 KO=347 )
> mean requests/sec 0.525 (OK=0.42 KO=0.105)
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 2 (40%)
> 800 ms < t < 1200 ms 1 (20%)
> t > 1200 ms 1 (20%)
> failed 1 (20%)
---- Errors --------------------------------------------------------------------
> currentLocation.find.is(https://google.com), but actually foun 1 (100.0%)
d http://login.salesforce.com/setup/forcecomHomepage.apexp?set...
================================================================================
を働くことを願っています。 – TestingWithArif
いいえ。どのような変更が必要か教えていただけますか? – Maharshi
@TestingWithArif – Maharshi