forked from facundoolano/google-play-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
27 lines (23 loc) · 841 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import newman from 'newman';
import collectionData from './PostmanCollections/GooglePlayAPI.postman_collection.json' assert { type: "json" };
import utCollectionData from './PostmanCollections/GPlayAPIUnitTests.postman_collection.json' assert { type: "json" };
import environmentData from './PostmanCollections/postman_environment.json' assert { type: "json" };
const runTests = async () => {
try {
newman.run({
collection: collectionData,
environment: environmentData,
reporters: ['cli', 'htmlextra']
});
newman.run({
collection: utCollectionData,
environment: environmentData,
reporters: ['cli', 'htmlextra']
});
console.log('API tests completed successfully!');
} catch (err) {
console.error('Newman encountered an error:', err);
process.exit(1);
}
};
runTests();