Artillery – API Freighting MCQs Solution
Artillery is a modern, powerful, and easy-to-use load performance testing tool that can be smoothly implemented with Jenkins via plugins. Use it to ship scalable applications that can have high performance and resilience under high load. It can be used for testing any application backed that works on HTTP, socket.io, and Websockets.
What is Performance Testing?
Various project stakeholders have different levels of concern and views regarding application performance.
- Solution Architect: Need to balance scalability and performance of application services as compare to other services.
- Developer: Should be aware when to start performance testing and the level of software optimization needed
- Quality Assurance Team: Should validate the ability of the application to support the expected workload during scheduled or unexpected events.
- Project Manager: Should check for application compliance to service level agreements and create effective and future realistic growth plans.
- Product owner: Would be more interested in the performance of the application with lower total cost of ownership of the software that the organization creates.
As this is a powerful load testing tool which help developers many ways like:
- Develop easy-to-use applications.
- Build application faster.
- Make application more scalable and resilient
- Supports multiple protocols like HTTP, WebSocket & socket.io
- Scenario based test steps interaction in API or Web Services
- Supports multiple platforms and can integrate with them like Datadog, Librato, InfluxDB, and statsd
- It can generate report in HTML format
- It can be parameterized using CSV File
- It generates performance metrics for latency, requests per second, concurrency and throughput.
- We can get Response Time using
Answer:- All of the option
2. Which of the following is correct about Little’s law?
3. Performance testing is used to determine the functions of application at a particular load.
4. Which of the following formula correctly defines Little’s law when Number of stable customer =N, Average arrival rate = λ, Average time spend by user = W
5. Stress testing means verifying application’s stability and capabilities.
6. Artillery can be installed on Nodejs v3.
7. What is the command to verify artillery?
Answer:- dino artillery
8. What command can be used to install artillery?
Answer:- npm install artillery
9. What does -c stand for in quick test?
10. What is the help command for artillery?
Answer:- artillery -help
11. Target is defined in the scenarios section
12. arrivalCount is defined as the arrival of the virtual users for the duration of time.
13. Which of the following is correct? (i)target is for base URL. (ii) phase is for recurrence of the request. (Iii) payload is for importing data. (iv) timeout is for wait time before server response. (v) environments is for associated target
14. What does think argument stand for in artillery script.
15. If we have defined the priority of execution of three phases as 2,3,7, which of the following is correct?
16. Phase of the script defines the api that we want to test.
17. What are the kinds of phases in artillery?
Answer:- arrival rate, count and pause
18. Priority of the scenarios are defined in _.
19. What is the success response for GET request?
20. Which request is similar to patch request?
21. Put request is used for ___.
22. What is the success response for creating new account?
23. Get request is used for ___.
Answer:- Listing all user
24. Post request is used for ___.
25. How can we call out data path?
26. If path of the variable is not defined in the script, how you can run the file?
Answer:- artillery run sample.yml
27. Inline variable is defined under __.
28. Following artillery script will error out. Which line is erroneous?
Answer:- line 3
29. Defined variable are called inside _.
30. If sample_report.json is the report generated, how can the report be viewed using json file?
Answer:- jq .aggregate sample_report.json
31. What does NaN (Not a Number) stand for
Answer:- not sufficient response
32. What does Scenarios launch stand for _.
Answer:- Virtual users generated in defined time
33. What is the command to convert json report to html?
Answer:- artillery report sample_report.json
34. How to add pool count?
35. Which is the correct syntax for log.
36. How to add loop count?
37. In the following code snippet, how do we set the timeout?
38. To send message in socket io, what command should we use?
39. What is built-in function for generating random alpha numeric?
Answer:- config processor
41. What is the engine value that we need to call in socket io?
42. How to debug web socket?
Answer:- ws artillery run sample
43. Command to debug http _.
Answer:- artillery run sample
44. Command to debug http capture .
Answer:- capture artillery run sample
45. Command to debug http response _.
Answer:- response artillery run sample
46. How to debug socket.io?
Answer:- socketio artillery run sample
47. Where can we set Header?
Answer:- any HTTP requests