In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
There is a picture version attached, which can be downloaded by yourself.
First, prepare the installation package:
Postman, inspector plug-ins, newman, jkenins, tomcat
Link: https://pan.baidu.com/s/1eSnbjvO password: h3i6
Remarks: Postman, inspector plug-ins
II. Postman installation
1. Open a chrome browser and enter: chrome://extensions/
2. Open developer mode
3. Decompress postman to the directory you want. Example: C:\ Program Files\ Postman_v4.1.3
4. Choose to load the unzipped extension
5. Select C:\ Program Files\ Postman_v4.1.3
6. Installation completed
III. Inspector installation
1. Drag and drop inspector to the browser prompt as shown in the figure
2. Click add
IV. Simple testing
1. Start postman and click skip.
2. Interceptor test can be intercepted by following steps 1 and 2 to record the success of the test.
3. Postman test can obtain the success of response test
5. Newman installation
1. Based on Node.js, newman should install Node.js first.
2. Installation command: npm install-g newman
3. Verify whether the installation is successful. The version number of newman-v appears, which means it is successful.
VI. Jkenins deployment
About the steps to install tomcat, put the jkenins war package under the webapps directory to start, and it will be automatically deployed when you access the address http://127.0.0.1:8080/jkenins
7. Simple configuration of jkenins
Mainly system management and mail configuration! There are many on the Internet. There will be time to improve it later.
Reference: http://blog.csdn.net/songjiaping/article/details/51496977
8. Postman is easy to use
1. Set the request method (get.post), request address, request header (header), request body (data post set body,get and set url suffix) as shown in the following figure. The tests tab is a js script to verify the return status. I just gave an example tests ["display name only"]. You will know the rest at a glance.
Tests ["Status code is 200"] = responseCode.code = = 200
Var jsonData = JSON.parse (responseBody)
Tests ["Your test name"] = jsonData.success = = true
2. After sending, check whether the corresponding is consistent with the expectation.
3. Direct scheduling and operation of postman
Click runner in the upper left corner
4. Select a file
5. Select the RUNS tab, select the folder to be executed, click start test to start the test, and the execution result will be displayed on the right.
7. The above is the basic application postman environment variables are also commonly used functions are mainly used for environment switching, you can define the environment address can be used in url and tags
It is the same principle to fill in the environment name develop and the variables in that environment, and then establish the release.
Gloabals tabs are global and can be used together to store public variables.
When using {{variable name}}, you can use Chestnut: the baseurl of the develop branch
Enter the following in the request address: `baseurl`: 8080/login can access the service and write it casually. I'm sorry.
8. Newman execution
Select the JSON file demo.json.postman_collection exported above
Report path:-- reporters html,junit-- reporter-html-export d:\ htmlout.html-- reporter-junit-export d:\ htmlout.xml
Newman run C:\ Users\ Administrator\ Desktop\ demo.json.postman_collection-- reporters html,junit-- reporter-html-export d:\ htmlout.html-- reporter-junit-export d:\ htmlout.xml
Other orders to learn by yourself.
9. Create a new free-style software combined with jkenins
Jkenins can only execute the command line. It just so happens that the newman runs the system on the command line successfully.
So that the report can be executed.
Note: it is best to run tomcat as an administrator
Attachment: http://down.51cto.com/data/2366926
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.