-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from RahulARanger/nodejs-reporters
Nodejs reporters
- Loading branch information
Showing
267 changed files
with
7,769 additions
and
4,836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: 'deploy-nodejs-reporters' | ||
|
||
on: | ||
push: | ||
branches: | ||
- "nodejs-reporters" | ||
paths: | ||
- '**.js' | ||
- '**.ts' | ||
- '**deploy-nodejs-reporters.yml' # for testing this workflow | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
test: | ||
name: Test Dashboard | ||
runs-on: 'macos-latest' | ||
permissions: write-all | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Setup Turbo Repo and conduct sanity test | ||
working-directory: ./handshake-nodejs-reporters | ||
run: npm install && npm run build && sudo npm run sanity | ||
|
||
- name: Download required for Dashboard | ||
working-directory: ./handshake-nodejs-reporters/packages/handshake-dashboard | ||
run: npm install | ||
|
||
- name: exporting results | ||
working-directory: ./handshake-nodejs-reporters | ||
run: | | ||
sudo npx handshake export ../TestResults --out ../TestReports | ||
- name: Create Release Pull Request | ||
uses: changesets/action@v1 | ||
with: | ||
cwd: ./handshake-nodejs-reporters | ||
publish: npx changeset publish | ||
title: "version handshake-nodejs-reporters" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish the package if required | ||
if: steps.changesets.outputs.published == 'true' | ||
run: echo 'published packages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
# Grasp-it | ||
# Handshake 🤝 | ||
_A Modern Test Reporter_ | ||
|
||
Utilizes the data collected from the test execution does some processing and then displays it in the Dashboard. | ||
Processes the data collected from the test execution and then generates a modern Dashboard. | ||
|
||
## Architecture | ||
## Getting Started | ||
|
||
- we initiate the Grasp-it-dashboard | ||
- this step would be skipped if these below steps were done previously, Note: it would be not skipped if it finds a new version of the dashboard | ||
- Copy the dashboard from `src` | ||
- downloads all the required npm modules | ||
- creates a new `TeStReSuLtS.db` | ||
- And then we start the framework | ||
- Past that we collect all the Test suites, sessions, test cases, we name this routes under the prefix: "register" | ||
- After the registration, we collect the details pertaining to the end result of the registered entity | ||
- Now we make sure to fill the calculated cells in some records that were added, this is to save the time while generating the report. | ||
- we export the results past the test completion, while this is an optional step, which could be configured at the plugin level, but it has to done at some point in order to generate a report. | ||
### Nodejs-Reporters | ||
|
||
#### WebdriverIO | ||
|
||
[WebdriverIO](https://webdriver.io/) is a Next-gen browser and mobile automation test framework for Node.js | ||
|
||
with the help of customer [reporter](https://webdriver.io/docs/customreporter/) and [service](https://webdriver.io/docs/customservices), we would be able to collect the results generated through its project. | ||
|
||
1. Install Packages: `npm install wdio-handshake-reporter` | ||
|
||
## Plans | ||
|
||
### Test Reports | ||
- Adding Attachments | ||
- Dynamic Report | ||
- JIRA Reporter | ||
|
||
### wdio-py-reporter | ||
- Support Cucumber framework | ||
- Dynamic Report | ||
|
||
### Note | ||
* https://python-poetry.org/docs/basic-usage/#using-your-virtual-environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import platform | ||
import subprocess | ||
|
||
from pytest import fixture, mark | ||
from pathlib import Path | ||
from handshake.services.DBService.shared import db_path as shared_db_path | ||
from tortoise.connection import connections | ||
from handshake.services.DBService.models.enums import ConfigKeys | ||
|
||
pytestmark = mark.asyncio | ||
|
||
testNames = "pyTestForOurProject" | ||
|
||
|
||
@fixture() | ||
def root_dir(): | ||
return Path(__file__).parent.parent / "TestResults" | ||
|
||
|
||
@fixture() | ||
def db_path(root_dir): | ||
return shared_db_path(root_dir) | ||
|
||
|
||
@fixture() | ||
def dist(root_dir): | ||
return root_dir.parent / "dist" | ||
|
||
|
||
@fixture() | ||
def dist_name(): | ||
return ( | ||
f"handshake-{platform.system()}.exe" | ||
if platform.system() == "Windows" | ||
else f"handshake-{platform.system()}" | ||
) | ||
|
||
|
||
@fixture() | ||
def init_db(root_dir): | ||
return lambda: subprocess.call(f'handshake config "{root_dir}"', shell=True) | ||
|
||
|
||
@fixture | ||
async def get_v3_connection(scripts): | ||
connection = connections.get("default") | ||
|
||
# assuming we are at v4 | ||
await connection.execute_script((scripts / "revert-v4.sql").read_text()) | ||
await connection.execute_query( | ||
"UPDATE CONFIGBASE set value = '3' where key = ?", (ConfigKeys.version,) | ||
) | ||
|
||
return connection | ||
|
||
|
||
@fixture | ||
def scripts(): | ||
return ( | ||
Path(__file__).parent.parent | ||
/ "handshake" | ||
/ "services" | ||
/ "DBService" | ||
/ "scripts" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.