I'm doing my first steps with JMeter and trying to write a small Test, which opens a page, logs in and checks if some text is displayed.
For this I created the following test, based on apache login example
- Constant Timer
- HTTP Cache Manager
- HTTP Cookie Manager
- HTTP-Request "Check login page"
- Servername
- Protocoll: https
- Path: login.xhtml
- Method: GET
- Port: empty/default
- Once Only Controller
- HTTP-Request "Do login"
- Servername
- Protocoll: https
- Path: login.xhtml
- Method: POST
- Port: empty/default
- Parameters and values for
j_username
andj_password
- Response Assertion with text chec (as child of the HTTP-Request "Do login")
- HTTP-Request "Do login"
- Interleave Controller
- HTTP-Request "Welcomepage" and Assertion
- Assertion Results
- View Results Tree
The login form only consists of (except css styles and labels):
<form id="loginForm" action="j_security_check" method="post">
<input id="j_username" name="j_username" type="text" tabindex="1" aria-required="true"/>
<input id="j_password" name="j_password" type="password" tabindex="2" aria-required="true"/>
</form>
When execution I can successfuly do the HTTP-Request "Check login page" (Step 4) but the step about "Do login" failes with
Response code: Non HTTP response code: javax.net.ssl.SSLHandshakeException Response message: Non HTTP response message: Remote host closed connection during handshake
So maybe the same question like this, where no useful answer was posted
Some information:
- Page is located in intranet, so no proxy is needed
- Page is fully accessable using browsers
- Please no comments like "Use BlazeMeter-Plugin" - it's an internal page and therefor not allowed to be recorded into any external cloud
- To be honest I don't want to use the JMeter record Proxy, because I want to understand what happens and how I can create things and not only execute some recorded stuff
- My thread groups only consists of one thread and user, so it can't be a problem like described in this SO-question
- JMeter 3.1 (2017-03-31) and Java 1.8
Maybe it has something to do with another form on the page, but as far as my HTML knowledge isn't outdated only one form per page can be submitted?!?
<form id="footerForm" name="footerForm" method="post" action="login.xhtml" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="<very long string, like base64 or something like that>">
</form>
If I also have to submit the second one - how can I do this?