-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpostman.libsonnet
39 lines (38 loc) · 1.23 KB
/
postman.libsonnet
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
28
29
30
31
32
33
34
35
36
37
38
39
// SPOOFING TO STAGING
//
// Directly spoofing in Postman/Newman is not possible. Options include editing hosts file,
// and using Charles.
// To use with Charles, quite simple:
//
// HTTPS_PROXY=127.0.0.1:8888 newman run -k collection.json
// -k : insecure (don't check cert)
//
// SKIPPING TESTS
//
// Not really practical for the time being, tracked here:
// https://github.com/postmanlabs/postman-app-support/issues/8929
//
// SCRIPTING
//
// https://learning.postman.com/docs/sending-requests/variables/#defining-variables-in-scripts
// Set a local, temporary variable
// pm.variables.set("variable_key", "variable_value");
// Set a global variable
// pm.globals.set("variable_key", "variable_value");
// Set an environment variable
// pm.environment.set("variable_key", "variable_value");
//
// Using dynamic variables (cache buster, random color, bank card number, guid, etc...)
// https://learning.postman.com/docs/sending-requests/variables/#using-dynamic-variables
(import './src/suite.libsonnet') +
(import './src/case.libsonnet') +
(import './src/request.libsonnet') +
(import './src/assert.libsonnet') +
(import './src/utils.libsonnet') +
(import './src/auth.libsonnet') + {
suite+:: {
pre+: [
importstr './src/js/utils.js',
],
},
}