You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Reason for this change
The current introduction does not properly explain how it works.
### Description of changes
updated readme only
### Description of how you validated changes
I have asked for feedback from peers
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-runner/README.md
+16-9Lines changed: 16 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ publishing this tool so that it can be used by the community and we would love t
24
24
on use cases that the tool should support, or issues that prevent the tool from being used in your
25
25
library.
26
26
27
-
This tool is meant to be used with the [integ-tests](https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/integ-tests-alpha) library.
27
+
This tool is meant to be used with the [integ-tests](https://docs.aws.amazon.com/cdk/api/v2/docs/integ-tests-alpha-readme.html) library.
28
28
29
29
## Usage
30
30
@@ -34,17 +34,24 @@ This tool is meant to be used with the [integ-tests](https://github.com/aws/aws-
34
34
integ-runner [ARGS] [TEST...]
35
35
```
36
36
37
-
This will look for all files that match the naming convention of `/integ.*.js$/`. Each of these files will be expected
38
-
to be a self contained CDK app. The runner will execute the following for each file (app):
37
+
This will look for all files that match the naming convention of `/integ.*.(js|ts)$/` or `/integ_*.py`.
38
+
Each of these files represents a self contained AWS CDK app, defining test cases and assertions using the [integ-tests](https://docs.aws.amazon.com/cdk/api/v2/docs/integ-tests-alpha-readme.html) library.
39
39
40
-
1. Check if snapshot files exist (i.e. `*.snapshot/**`)
41
-
2. If the snapshot does not exist\
42
-
a) Synth the integ app which will produce the `integ.json` file
43
-
3. Read the `integ.json` file which contains instructions on what the runner should do.
44
-
4. Execute instructions
40
+
By default, executing `integ-runner` will do the following for each file (app):
41
+
42
+
1. Synth each integration test to create a new snapshot in memory
43
+
2. Compare the snapshot to the previous version (i.e. files in `*.snapshot/**`), and fail on any differences.\
44
+
For new tests this will always fail.
45
+
46
+
To accept a snapshot update, the integreation test has to be deployed and assertions have to pass.\
47
+
Execute the runner again, this time with `integ-runner --update-on-fail` and the following will happen for each file:
48
+
49
+
1. Deploy the previous snapshot
50
+
2. Deploy the new version as a Stack update and run assertions
51
+
3. If successful, update the snapshots
45
52
46
53
All snapshot files (i.e. `*.snapshot/**`) must be checked-in to version control.
47
-
If not, changes cannot be compared across systems.
54
+
If not, changes cannot be compared across systems and the [update workflow](#update-workflow) cannot be used.
0 commit comments