Tôi không biết câu hỏi này có còn liên quan hay không, nhưng hiện tại có khả năng như vậy trong Postman. Họ đã thêm nó vài tháng trước.
Tất cả những gì bạn cần là tạo tệp .js đơn giản và chạy tệp đó qua node.js. Có vẻ như sau:
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.`);
});
});
Sau đó, chỉ cần chạy tệp .js này ('node fileName.js' in cmd).
Chi tiết here
Nguồn
2016-12-16 10:08:08
Để chạy thử nghiệm đồng thời bằng Bộ sưu tập Runner, [liên kết này] (https://timbeynart.com/2017/03/14/use-postman-to-hammer-a-rest-api/) hiển thị một chút hack làm thế nào để làm nó. – Ray
JMeter là nhờ tuyệt vời cho các tip. –