"163 netease Mailbox page Parametric test", in the online search for information for a long time, found that for me this small white, or not enough detail, I think of my own thinking of a very long to slowly a little grasp, so the parameterization of the detailed process to comb through, to help themselves record, also help small white study.
"1" first step, must be the first to download two software tools, two tools packaged in the Baidu Cloud, you can directly use HTTP://PAN.BAIDU.COM/S/1MICSNT2. Of course, you have to download your own official website is ok huh. JMeter decompression can be used directly, Badboy compressed package decompression is Badboyinstaller-2.0.5.exe, run the file for Badboy installation
"2" Download after installing Badboy and JMeter, open Badboy.exe, the following page appears
"3" red button for the clicked effect, indicating that the recording is now in the URL, enter the address of the site under test (the following 163 NetEase mailbox Web address for example)
Click the right ARROW key to make sure to enter the page
"4" Enter an existing account password, click Login, log in successfully click on the mailbox to exit
"5" Click the red button again to end the recording, the box disappears is the exit recording
"6" exports the recorded script and tests it using JMeter. Click File----Export to JMeter----save to the specified location (named CHECK_163.JMX)
"7" Open the JMeter folder-----bin------Click Jmeter.bat, Run JMeter, then the Black window will pop up, waiting for the JMeter window will appear (remember not to turn off the black window (jmeter.bat), JMeter will also be turned off)
"8" with JMeter Open just badboy recorded script check_163.jmx. After entering the JMeter, click on the file------open-------Browse to find just the CHECK_163.JMX----check open
The thread group is generated after it is opened
"9" Click on the left side of the thread group will appear drop-down menu, Click on the left of step 1 will appear drop-down URL, for the recording of the specific response page
"10" Next need to the account password parameterization, first you need to know the account password input is in which page inside, in order to change, in JMeter inside find will be more troublesome, suggest you in Badboy recording when the first look at where, in Badboy inside will have "+" number of the page to open again, Just open it.
We can find the write of the account password (username,password) found in the details.
is in this page, and then the corresponding to see it is in which page inside
This is the page at the top of the picture.
Well, we've found the web, so we can go back to jmeter.
"11" in JMeter Step1 to see the same page
Yes, that's it.
The following actions are performed on this page, so remember that you don't have to click on another page.
"12" Click on this page and the HTTP request will appear on the right.
View here, is the properties of this page, click the next triangle here, see more of the following properties
Click on the triangle to find
You'll find username and password.
"13" Parametric account password
Double-click their value, change to, account is user, password is pass
, click Save at the top.
"14" Write a copy of the pre-input account password file.
Desktop new TXT file, write the account password in the file, 1 front account password, comma separated
Like this, I separately simulated the letter mailbox, telephone mailbox, empty account, blank password, unregistered account 5 kinds of circumstances to test whether login
After writing, save, rename the file suffix to CSV format, the box hint what no tube, directly determine (like my last file is Text_in.csv)
Reminder: If you need to modify the test account password after the data, you need to open the CSV file with Notepad, do not directly double-click Open Changes, save time will be error.
"15" Right click on the page
Select Add--Configure component---CSV Data Set Config. will appear
Fill in the data, filename to fill in the file name (including location), if you put in D, that is to use "D:\text_in.csv", Variable names here to fill in the parameters (we just set the account is user, password is pass), the other do not fill in and modify , click Save.
"16" Add assertions, my understanding is that I use these accounts to test the login, need to know when to successfully login when not to, need to have feedback to tell me. Here the assertion is quite the judgment of the IF statement, I test is 163 NetEase mailbox, if successful login and so on its response data inside is "Mail163_letter", I can according to have no feedback this to judge the success of the login did not.
PS: There may be doubts, if you test other sites how to know what to do with the response data, in fact, I first saw the successful login and did not successfully log on their response data of the differences, and then to determine the use of this. If you do not understand here you can look down first, I will explain how to choose this response.
Also right click on the page just now, click Add----assert-----response Assertion
In the Response Assertion page, find the bottom "mode to test", click Add, double click Add Area, fill in the response data mail163_letter
Choose Save, so the verdict is written.
The result of the "17" response assertion needs to be put up for easy viewing, so you need to add an assertion result
or the page, right-click, add-listener-the assertion results, do not write anything, save OK.
"18" to view the results. or the page, right-click Add-Listener----View results tree
"19" In the final step, click Threads "Thread Group" to set the thread. Because there are 5 cases in the CSV file of the account password, the thread needs to be set to 5. How many kinds of processes will be set for the number of data
Click Save.
"20" Click to select the top Badboy Test Plan, then select Run---start at the title bar, indicate running, wait until green to indicate run end.
"21" Analysis data phase
Click View results tree to see
Click on the Second Red page, the right side will appear the sampler results, request, Response Data tab. Click on "Request" to see
The bottom here appears username and password, the account is empty, the password is there.
We separately open the successful login with unsuccessful "response data", such as
The successful Login
Failed to log on successfully
Compared to the successful login can be seen when the "mail163_letter" this response data, or the other line, only the successful login of the failed login is not OK, this also explains the reason I chose this data, because I tried earlier, so I know there will be this response data. If you want to set the response data, you can first respond to the assertion there is not filled out, run the entire project this time is displayed all through, so you then the if judgment is quite empty, then everything is right. This time you only have to look at the response data, the comparison will be able to know that the data only successful login, you choose to modify the response assertion there.
Response assertion is empty here
The result tree is all through, the green
The response data is not changed, regardless of whether you have an assertion, so you can then view the selection response data.
Summary: Finally, in fact, by responding to assertions, look at the result tree where the green means that its account password can pass, red is not landing. Through this implementation to the CSV file there account password Automation input.
Small white Please learn from, master please pointing
"T1" badboy with JMeter web parametric test (Pigeon detailed)