AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 23.10.2017, 20:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
axtoday: How to do simultaneous request calls using Postman collections
Источник: http://axtoday.blogspot.com/2017/09/...est-calls.html
==============

Newman is a command line collection runner for Postman. It allows you to run and test a Postman Collection directly from the command line. It is built with extensibility in mind so that you can easily integrate it with your continuous integration servers and build systems.

With Newman and Async, you can do simultaneous request calls which will be very helpful for performance tests.

Here are what you'll need to do to get it working:


  1. Install Newman by following the instructions on http://blog.getpostman.com/2015/04/0...an-on-windows/
    In my case, I didn’t have to install Python to get it working.
  2. Create/use a folder for the tests
  3. Export a Postman collection into a file
  4. Export a Postman environment that you want to invoke the calls to
  5. Open a command prompt in administrator mode on the folder from step 2
  6. Install async module by typing npm install --save async
  7. Create a .js file
    var path = require('path'),
    async = require('async'), //https://www.npmjs.com/package/async
    newman = require('newman'),

    parametersForTestRun = {
    collection: path.join(__dirname, 'postman_collection.json'), // your collection
    environment: path.join(__dirname, 'postman_environment.json'), //your env
    };

    parallelCollectionRun = function(done) {
    newman.run(parametersForTestRun, done);
    };

    // Runs the Postman sample collection thrice, in parallel.
    async.parallel([
    parallelCollectionRun,
    parallelCollectionRun,
    parallelCollectionRun
    ],
    function(err, results) {
    err && console.error(err);

    results.forEach(function(result) {
    var failures = result.run.failures;
    console.info(failures.length ? JSON.stringify(failures.failures, null, 2) :
    `${result.collection.name} ran successfully.`);
    });
    });
  8. Run the .js file from step 7 from command prompt node fileName.js


Источник: http://axtoday.blogspot.com/2017/09/...est-calls.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axtoday: How to get the field type/size and mandatory fields out of data management import/export project Blog bot DAX Blogs 0 23.10.2017 20:13
msdyncomm: How Do I: SEPA Recurring Direct Debit Collections in Microsoft Dynamics NAV 2013 R2 Blog bot NAV: Blogs 0 18.12.2013 21:11
msdyncomm: How Do I SEPA One off Direct Debit Collections in Microsoft Dynamics NAV 2013 R2 Blog bot NAV: Blogs 0 05.12.2013 00:13
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
emeadaxsupport: How to fix SQL error: "Too many parameters were provided in this RPC request" Blog bot DAX Blogs 0 01.09.2009 15:05
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:13.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.