Skip to content

Commit 08e34a0

Browse files
committed
chore: split example to subpackages
1 parent a3c9e97 commit 08e34a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+292
-2499
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ node_modules
44
upload.marker.json
55
.currents
66
.env
7-
cypress/
7+
cypress/
8+
.turbo
9+
**/.currents

README.md

+9-65
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,16 @@
11
# Currents.dev - JUnit XML report example
22

3-
This is an example repository that showcases using [Currents.dev](https://currents.dev) for sending test results via Currents Generic API.
3+
This is an example repository that showcases integrating variout testing frameworks with [Currents.dev](https://currents.dev).
44

5+
## Setup
56

6-
- Note: get your record key from [Currents.dev](https://app.currents.dev)
7-
8-
- Note: obtain the project id from [Currents.dev](https://app.currents.dev)
9-
10-
## Definitions:
11-
- Report directory: Is the folder path where currents/cmd will get/generate files and information for uploading your test results to Currents platform.
12-
13-
14-
## Key points:
15-
- You have all scripts required to test the Generic API example in the `package.json` file
16-
- All the examples must have the `instances` folder within their respective example folders. Eg: `postman-tests-example/instances`
17-
- All the examples must have their respective `config.json` file with the following structure:
18-
```
19-
{
20-
"framework": "junit", // This is mandatory
21-
"frameworkVersion": "11.10.0", // Your framework's version
22-
"cliArgs": {
23-
"options": {
24-
"jUnitFile": "postman-tests-example/tests.xml" // This is mandatory and must point to the JUnit XML file with the tests results
25-
},
26-
"args": []
27-
},
28-
"frameworkConfig": {
29-
"originFramework": "postman", // This is your framework's name
30-
"originFrameworkVersion": "11.10.0" // This is your framework's version
31-
}
32-
}
7+
```sh
8+
npm install
339
```
34-
- Recognized `originFramework` values in the dashboard are: `postman` for Postman, `vitest` for Vitest and `wdio` for WebDriver.io
35-
- You can run the `<framework>:full` command for each example to execute all the related commands to the specific example or execute each one of the commands in order to understand what is the purpose of each one.
36-
37-
38-
## How to try it?
39-
1. Execute `npm run initial-setup` for setting up the needed folders for all the examples.
40-
2. Get your Record key and Project ID from Currents dashboard.
41-
3. Put the Record key, Project ID and a unique CI build ID in a `.env` file like this:
42-
```
43-
CURRENTS_KEY=your-record-key
44-
CURRENTS_PROJECT_ID=your-project-id
45-
CURRENTS_CI_BUILD_ID=unique-id
46-
```
47-
48-
### Postman
49-
Postman example is in `postman-tests-example` folder.
50-
The Postman example has the following commands:
51-
- `parse-postman-test`: Parses the JSON file exported from the Postman collection and turns it into a JUnit XML file. It uses `newman` to transform the file.
52-
- `gen-instance-postman`: Generates the instance files into `postman-tests-example/instances` folder from the JUnit XML file.
53-
- `report-results-postman`: Uploads the results to Currents platform.
54-
- `postman:full`: Executes all the postman example related commands consecutively in the right order.
55-
56-
Note: `gen-instance-postman` command uses `currents convert` command to make the file parsing easier for postman specifically and will increase the support for other frameworks overtime.
5710

58-
### Vitest
59-
Vitest example is in `vitest-example` folder.
60-
The Vitest example has the following commands:
61-
- `test-vitest`: Executes the vitest tests and outputs the result into a JUnit XML file.
62-
- `gen-instance-vitest`: Generates the instance files into `vistes-example/instances` folder from the JUnit XML file.
63-
- `report-results-vitest`: Uploads the results to Currents platform.
64-
- `vitest:full`: Executes all the vitest example related commands consecutively in the right order.
11+
## Examples
6512

66-
### WebDriver.io
67-
WebDriver.io example is in `wdio-example` folder.
68-
The WebDriver.io example has the following commands:
69-
- `test-wdio`: Executes the WebDriver.io tests and outputs the result into a JUnit XML file.
70-
- `gen-instance-wdio`: Generates the instance files into `wdio-example/instances` folder from the JUnit XML file.
71-
- `report-results-wdio`: Uploads the results to Currents platform.
72-
- `wdio:full`: Executes all the WebDriver.io example related commands consecutively in the right order.
13+
- [Postman](./packages/postman)
14+
- [Vitest](./packages/vitest)
15+
- [Vitest - parallel runs on GitHub Actions](./packages/vitest)
16+
- [WebdriverIO](./packages/wdio)

0 commit comments

Comments
 (0)