Skip to content

Commit

Permalink
Merge pull request #8 from sadabnepal/feature/report-portal
Browse files Browse the repository at this point in the history
report portal setup
  • Loading branch information
sadabnepal authored Apr 21, 2024
2 parents 8f5ecea + ff4c2df commit 3bf1e73
Show file tree
Hide file tree
Showing 12 changed files with 1,465 additions and 59 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REPORT_PORTAL_KEY=
REPORT_PORTAL_PROJECT=
26 changes: 1 addition & 25 deletions .github/workflows/web.test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Smoke Suite
name: WebdriverIO Test Suite
on:
push:
branches: main
Expand Down Expand Up @@ -42,28 +42,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: AllureReportChrome
path: ./allure-report

regression_on_edge:
needs: [smoke]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm ci
- name: Run Test
run: npm run test:edge
- name: Generate Allure Report
run: npm run report
if: always()
- name: Upload Allure Report to Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: AllureReportEdge
path: ./allure-report
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
allure-report
allure-results
mochawesome-report
.env
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ npm run cross-browser [ test in chrome and edge ]
npm run test:docker [ test inside container ]
```

Docker:
Docker Run:

```bash
docker compose -f docker-compose.yml up
open http://localhost:4444/ to check if server is running
docker compose -f docker-compose-arm.yml up [ for m1 chip mac user]
docker compose -f tests/docker/docker-compose.yml up -d
docker compose -f tests/docker/docker-compose.yml down

docker compose -f tests/docker/docker-compose-arm.yml up -d [m1 chip mac user]
docker compose -f tests/docker/docker-compose-arm.yml down
```
open http://localhost:4444/ to check if server is running

Generate report:

Expand All @@ -50,12 +53,28 @@ Cleanup Report folder
```bash
npm run cleanup
```
### Github Action Workflow
![docker_run](./images/githubRun.png)

### Report Portal Integration
- Setup: follow https://reportportal.io/installation
- Login: Open http://localhost:8080/ and login with time user `superadmin` and password `erebus`
- Generate API key:
- Click on bottom left of logged in user --> click on `Profile`
- Click on `API KEYS` --> `Generate API Key` --> copy the generated key
- Create `.env` file in root project folder. Refer `.env.example` file
- Paste your API key into `.env` file as `REPORT_PORTAL_KEY=<your api key>`
- Enter `REPORT_PORTAL_PROJECT=<project_assignment>` into `.env`. Value can be found on `PROJECT ASSIGNMENT` tab of user profile
- Other details are updated in `tests/config/wdio.reportPortal.ts` file

![docker_run](./images/reportPortal.png)

### Key Features
- Custom types for web elements
- Parallel execution and Cross browser testing
- Docker for run test again/using containerization
- Github actions CI/CD integration
- Report portal integration

### Folder Structure

Expand Down
Loading

0 comments on commit 3bf1e73

Please sign in to comment.