Publié le Aug 25, 2019
Postman peut servir d'outil d'automatisation de l'assurance qualité pour les startups et autres entreprises de produits logiciels. Vous trouverez ici une grande variété de cas d'utilisation.
We all know “postman” we do use it as API test tool for the QA department. Mostly for straightforward non-automative solutions. But postman facilitates for very interesting integrations and automation like bulk run, console execution, runner support & CI (continuous integrations). Here we will be talking about Postman software automation, and we will showcase some test cases examples.
1. Test API /Rest: Straightforward run and check individually: It’s Basic 🙂
2. Write QA test cases over your request: Yes. you can refer this for syntaxes and method. : Link
3. Test multiple requests as bulk execution: Yes. Postman support for this. You can create a test suite and run. You will have a nice dashboard too.
Today we will see, postman automation scripts
Now once the latest cases are built, we need to pass it Newman to run these QA scripts from the command line. The basic idea of running these tests using the command line is that we can pass them to Jenkins further, which in return will run the test cases periodically, with this intention to run the test cases in Newman, we need to export the test scripts and other information like URL, also the headers, and many other items from the postman in JSON format.
https://learning.getpostman.com/docs/postman/collection_runs/command_line_integration_with_newman/
1. In postman, click on the (*) located at the top right section.
2. Click on Manage Environment
3. Now click on download icon placed against the environment name
4. Save the JSON on the same location where the collection was saved
5. Now to download global variables, click on the “Globals” button placed at the bottom of the pop-up.
6. Click on “Download as JSON” button.
7. Save the JSON on the same location as others.
Now we need to generate json for test suit
Steps to export JSON for newman:-
1. In postman, under Collections section, select the required collection.
2. Click on Export as shown in the image below.
3. Select “Collection v2”
4. Click on Export
5. Save this JSON
Now it’s time to run our test cases from the command line
Steps to run test cases from the command line:-
1.Open CMD
2.Now reach to the folder where your JSON is saved
3.Now hit command as below
newman run Test_Collection.postman_collection.json -e Environment.postman_environment.json -g globals.postman_globals.json -d demoData.csv --reporters cli,html
Now you will see this result in the console
And you can get the HTML report (Detailed) in the same folder. Tadaaa !!
Now you can customize this structure for the automation project.
Actually, we can do two things now.
* You can manage repetition of the API’s. for performance benchmarking
* Check integration with Jenkins
https://learning.getpostman.com/docs/postman/collection_runs/command_line_integration_with_newman/
Related Topics By ZIWO:
Hackathon: Where Creativity Becomes Reality !
>
>
>
Lectures
Dernières News
Interviews, conseils, guides, meilleures pratiques du secteur et actualités.
Strategies for a Productive First Contact with Clients
Take time to focus on the First Contact with Clients, so you can adjust the customer experience (CX) strategy to provide the best service.
Lire la suiteThe Power of WhatsApp Business with ZIWO Conversations
ZIWO Conversations is recognized as the premier WhatsApp Business Companion, elevating both customer experiences and team collaboration to a higher standard.
Lire la suitePause and Resume Call Recording – Benefits & Industries
agents can manually pause and resume call recordings, Once an administrator has enabled the feature, agents will see a button on the dialpad
Lire la suiteOutbound IVR (Interactive Voice Response) – Definition, Components, Benefits & Practices
Outbound IVR feature is a contact center tool that is used to proactively distribute communications to customers with a predefined IVR menu.
Lire la suiteHow to Become a Customer-Centric Organization
Ways to Build a customer-centric culture in your company, customer-centricity needs to be part of your philosophy, values, and mission daily.
Lire la suiteMultilingual Contact Centers: Bridging Language Gaps
Discover how multilingual contact centers overcome language barriers to deliver outstanding assistance, thereby elevating customer experience
Lire la suite