Skip to content

Commit 90efa60

Browse files
committed
Adding README.md for e2e-cli
1 parent 9235f2e commit 90efa60

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

e2e-cli/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# analytics-java e2e-cli
2+
3+
E2E test CLI for the [analytics-java](https://github.com/segmentio/analytics-java) SDK. Accepts a JSON input describing events and SDK configuration, sends them through the real SDK, and outputs results as JSON.
4+
5+
Built with Kotlin (JVM) and packaged as a fat jar via Maven.
6+
7+
## Setup
8+
9+
```bash
10+
mvn package -pl e2e-cli -am
11+
```
12+
13+
## Usage
14+
15+
```bash
16+
java -jar e2e-cli/target/e2e-cli-*-jar-with-dependencies.jar --input '{"writeKey":"...", ...}'
17+
```
18+
19+
## Input Format
20+
21+
```jsonc
22+
{
23+
"writeKey": "your-write-key", // required
24+
"apiHost": "https://...", // optional — SDK default if omitted
25+
"sequences": [ // required — event sequences to send
26+
{
27+
"delayMs": 0,
28+
"events": [
29+
{ "type": "track", "event": "Test", "userId": "user-1" }
30+
]
31+
}
32+
],
33+
"config": { // optional
34+
"flushAt": 250,
35+
"flushInterval": 10000,
36+
"maxRetries": 3,
37+
"timeout": 15
38+
}
39+
}
40+
```
41+
42+
Note: Java is a server-side SDK — there is no CDN settings fetch, so `cdnHost` does not apply.
43+
44+
## Output Format
45+
46+
```json
47+
{ "success": true, "sentBatches": 1 }
48+
```
49+
50+
On failure:
51+
52+
```json
53+
{ "success": false, "error": "description", "sentBatches": 0 }
54+
```

0 commit comments

Comments
 (0)