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
Copy file name to clipboardExpand all lines: contract-tests/README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,9 @@ The tests present here rely on the auto-instrumentation of a sample application
11
11
# Types of tested frameworks
12
12
13
13
The frameworks and libraries that are tested in the contract tests should fall in the following categories (more can be added on demand):
14
-
* http-servers - applications meant to test http servers (e.g. Django).
15
-
* http-clients - applications meant to test http clients (e.g. requests).
16
-
* aws-sdk - Applications meant to test the AWS SDK (e.g. botocore).
17
-
* database-clients - Applications meant to test database clients (e.g. psychopg2).
14
+
* http-servers - applications meant to test http servers (e.g. http module in node.js).
15
+
* aws-sdk - Applications meant to test the AWS SDK (e.g. AWS SDK for JavaScript v3).
16
+
* database-clients - Applications meant to test database clients (e.g. mysql2, Mongoose, Mongodb).
18
17
19
18
When testing a framework, we will create a sample application. The sample applications are stored following this convention: `contract-tests/images/applications/<framework-name>`.
20
19
@@ -23,7 +22,7 @@ When testing a framework, we will create a sample application. The sample applic
23
22
The steps to add a new test for a library or framework are:
24
23
* Create a sample application.
25
24
* The sample application should be created in `contract-tests/images/applications/<framework-name>`.
26
-
* Implement a `pyproject.toml` (to ensure code style checks run), `Dockerfile`, and `requirements.txt` file. See the `requests`application for an example of this.
25
+
* Implement a node.js application and create a `Dockerfile` to containerize the application
27
26
* Add a test class for the sample application.
28
27
* The test class should be created in `contract-tests/tests/amazon/<framework-name>`.
29
28
* The test class should extend `contract_test_base.py`
@@ -34,9 +33,17 @@ Pre-requirements:
34
33
* Have `docker` installed and running - verify by running the `docker` command.
35
34
36
35
Steps:
37
-
* From `aws-otel-python-instrumentation` dir, execute:
36
+
* From `aws-otel-js-instrumentation` dir, execute:
38
37
```sh
38
+
# create a virtual environment in python for the tests
39
+
python3 -m venv venv
40
+
source venv/bin/activate
41
+
# build the instrumentation SDK
39
42
./scripts/build_and_install_distro.sh
43
+
# build the relevant images for sample app and build the contract tests
0 commit comments