Skip to content

Commit 82574b7

Browse files
committed
README updated
1 parent 21a69b9 commit 82574b7

File tree

1 file changed

+123
-41
lines changed

1 file changed

+123
-41
lines changed

README.md

Lines changed: 123 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,138 @@
1+
12
![LambdaTest Logo](https://www.lambdatest.com/resources/images/logos/logo.svg)
23

34
# Node fetch sessions
45

5-
[![npm version](https://img.shields.io/npm/v/@lambdatest/node-fetch-sessions.svg?style=flat)](https://www.npmjs.com/package/@lambdatest/node-fetch-sessions)
6+
A command-line interface(CLI) to fetch [LambdaTest](https://automation.lambdatest.com/build) automation session details through [@lambdatest/node-rest-client](https://www.npmjs.com/package/@lambdatest/node-rest-client).
67

7-
A command-line interface(CLI) to fetch [LambdaTest](https://www.lambdatest.com) automation session details through [@lambdatest/node-rest-client](https://www.npmjs.com/package/@lambdatest/node-rest-client).
8+
### Steps to fetch LambdaTest automation session details
89

9-
## Installation
10+
#### Step 1. Installation
1011

1112
```
12-
npm i -g @lambdatest/node-fetch-sessions
13+
$ npm i -g @lambdatest/node-fetch-sessions
1314
```
1415

15-
## Example
16-
17-
```sh
18-
19-
// The username for the LambdaTest account
20-
export LT_USERNAME=abc
21-
22-
// The accessKey for the LambdaTest account
23-
export LT_ACCESS_KEY=def
24-
25-
// The build name whose test session information is to be fetched
26-
export LT_BUILD_NAME=Demo
27-
28-
## Retrieve sessions list
29-
fetch-Lt-sessions
30-
31-
## Support for enhanced cypress reporting
32-
fetch-Lt-sessions --enhancedCyReport
16+
#### Step 2. Set LambdaTest Username and Access Key in environment variables.
17+
18+
For Linux/macOS:
19+
```
20+
$ export LT_USERNAME="YOUR_USERNAME"
21+
$ export LT_ACCESS_KEY="YOUR ACCESS KEY"
22+
```
23+
For Windows:
24+
```
25+
$ set LT_USERNAME="YOUR_USERNAME"
26+
$ set LT_ACCESS_KEY="YOUR ACCESS KEY"
3327
```
3428

35-
## **License**
36-
37-
Node fetch sessions is available under the [Apache License 2.0](https://github.com/LambdaTest/node-fetch-session/blob/main/LICENSE). Use it wisely.
38-
39-
## About LambdaTest
29+
#### Step 3. Set Build Name for which the test session information is required
30+
For Linux/macOS:
31+
```
32+
$ export LT_BUILD_NAME="<Add Build Name>"
33+
```
34+
For Windows:
35+
```
36+
$ set LT_BUILD_NAME="<Add Build Name>"
37+
```
4038

41-
[LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=node-fetch-session) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.
39+
#### Step 4. Retrieve the list of automation sessions
40+
```
41+
$ fetch-Lt-sessions
42+
```
43+
#### Expected Output
44+
```
45+
{
46+
"success":true,
47+
"error":"",
48+
"msg":"session listing retrieved",
49+
"data":
50+
{
51+
"Meta":{"attributes":{"org_id":******},
52+
"result_set":{"count":1,"limit":10000,"offset":0,"total":1}},
53+
"data":[{"test_id":"****-*****-*****-*****",
54+
"build_id":*******,
55+
"build_name":"Python Slack Test Demo",
56+
"user_id":******,
57+
"username":"*****",
58+
"status_ind":"passed",
59+
"create_timestamp":"2022-09-12 15:03:35",
60+
"start_timestamp":"2022-09-12 15:03:49",
61+
"end_timestamp":"2022-09-12 15:04:11",
62+
"remark":"completed",
63+
"browser":"firefox",
64+
"platform":"win11",
65+
"version":"100.0",
66+
"name":"Python Demo Test",
67+
"session_id":"*****-*****-*****-*****",
68+
"duration":"22",
69+
"test_type":"selenium",
70+
"selenium_logs":"Link to selenium logs",
71+
"console_logs":"Link to console logs ",
72+
"network_logs":"link to network logs",
73+
"command_logs":"link to command logs",
74+
"video_url":"link to the test video",
75+
"screenshot_url":"link to the screenshot"}],
76+
"message":"Retrieve build list was successful",
77+
"status":"success"}
78+
}
79+
```
80+
#### Note: In order to retreive the list of only Cypress tests run the command below
81+
```
82+
$ fetch-Lt-sessions --enhancedCyReport
83+
```
84+
#### Expected Output
85+
```
86+
{
87+
"success":true,
88+
"error":"",
89+
"msg":"Retrieve enhanced cypress report was successfull",
90+
"data":[
91+
"*****-*****-*****-*****":{
92+
"stats":{"suites":1,"tests":3,"passes":2,"pending":0,"failures":1,
93+
"start":"2022-09-06T10:03:01.902Z",
94+
"end":"2022-09-06T10:03:12.146Z",
95+
"duration":10244,
96+
"testsRegistered":6,
97+
"passPercent":33.33333333333333,
98+
"pendingPercent":0,
99+
"other":0,
100+
"hasOther":false,
101+
"skipped":0,
102+
"hasSkipped":false},
103+
"results":[
104+
{"uuid":"",
105+
"title":"",
106+
"fullFile":"",
107+
"file":"",
108+
"beforeHooks":null,
109+
"afterHooks":null,
110+
}]}}
111+
]
112+
}
113+
```
42114

43-
### Features
115+
#### In case your Build _does not_ have a Cypress test the Command Line Interface returns the following
116+
```
117+
No cypress tests found in the build with name <Your Build Name>
118+
```
119+
### License
120+
Node fetch sessions is available under the [Apache License 2.0.](https://github.com/LambdaTest/node-fetch-session/blob/main/LICENSE) Use it wisely.
121+
122+
### About LambdaTest
123+
[LambdaTest](https://www.lambdatest.com/) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.
124+
125+
#### Features
126+
- Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
127+
- Real-time cross browser testing on 3000+ environments.
128+
- Test on Real device cloud
129+
- Blazing fast test automation with HyperExecute
130+
- Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
131+
- Smart Visual Regression Testing on cloud
132+
- 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.
133+
- Automated Screenshot testing across multiple browsers in a single click.
134+
- Local testing of web and mobile apps.
135+
- Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
136+
- Geolocation testing of web and mobile apps across 53+ countries.
137+
- LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports
44138

45-
- Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
46-
- Real-time cross browser testing on 3000+ environments.
47-
- Test on Real device cloud
48-
- Blazing fast test automation with HyperExecute
49-
- Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
50-
- Smart Visual Regression Testing on cloud
51-
- 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.
52-
- Automated Screenshot testing across multiple browsers in a single click.
53-
- Local testing of web and mobile apps.
54-
- Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
55-
- Geolocation testing of web and mobile apps across 53+ countries.
56-
- LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports

0 commit comments

Comments
 (0)