cloudflare / cloudflare/telescope

Add an option to provide a config file.

Open
#62 6 comments 1 reaction 1 assignee Claimed by @nicjansma View on GitHub
ticket
Dominant language
TypeScript
Stars
305
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Add an option to specify a configuration file containing the values used to pass to the playwright engine. The config.json file that is output to the results directory should be reusable to launch a test with the same parameters.

CLI parameters override the values in the config.

### Proposed format
`--config . Provide a configuration file to initiate the test.`

The config.json file can include a `config` property that stores all the specified values and no defaults.
If the `config` property does not exist, fallback creating the test using all values in the config.json.

### Examples
```bash
npx . -u https://example.com
```
produces
```json
"runParameters": {
"url": "https://example.com"
}
```
---
```bash
npx . -u https://example.com -b "firefox" -h {"header1":"one","header2":"two"}
```
produces
```json
"runParameters": {
"url": "https://example.com",
"browser": "firefox",
"headers": {"header1":"one","header2":"two"}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.