# Setup

Different Frameworks would have their terminology and notation, though some of which could be common across, so the idea is to transform the values provided by the test runner and then display it with a similar dashboard so that anyone can understand the results easily.

### Handshake (python-build)

***

Handshake (Python Build) is responsible for processing our Test Results into a common format, it calculates the results and ensures that the reports so generated look similar to the ones with the same tests but with different runners.

<details>

<summary>Steps</summary>

* Clone [this](https://github.com/RahulARanger/handshake) repo.
* Visit these [requirements](https://rahuls-organization-17.gitbook.io/handshake/architecture-and-contribution/local-setup/requirements) for double checking
* `pip install poetry nox`&#x20;
* in the root path, perform: `python -m venv venv`
* Activate Virtual Environment,
  * &#x20;`source ./venv/bin/activate` if Linux or MacOS&#x20;
  * &#x20;else if Windows, `./venv/scripts/activate`
* In the root of the project directory, execute: `poetry install`

you can refer to [this ](https://vegastack.com/tutorials/how-to-install-python-3-11-on-ubuntu-22-04/)blog to set up Python 3.11 from a source in **Ubuntu**. *(if required)*

</details>

After setup, you can check if it is working or not with `handshake v` or `handshake --version`

<details>

<summary>Testing</summary>

#### Pytest

pytest runs our test cases you can it under `__test__` present in the root directory, we have tests written for the

* server
* CLI
* migrator
* scheduler
* exporter.&#x20;

to execute them you can run `pytest __test__`

#### Nox

since we support to run in py-3.11 and py-3.12. with `nox -s test` we can test it under those versions of Python as well.

</details>

### Dashboard

***

The dashboard is built using [React](https://react.dev/) and [Next.JS](https://nextjs.org/)

The AIM of the Dashboard repo. is to generate a skeleton dashboard export that utilizes the export generated by the `handshake scheduler` for displaying beautiful **(Should be)** reports.

<details>

<summary>Steps</summary>

* After cloning the repo.&#x20;
* Move to `handshake-nodejs-reporters/packages/handshake-dashboard`
* Execute `npm install` - Takes some time.
* To start the dev server: `npm run dev`
* To start the storybook dev server: `npm run storybook`

</details>

With these, we would be able to run the dev. version. you can explore the rest. 😊

<details>

<summary>Testing</summary>

#### Component Tests

we have written interactive tests inside the storybook to run it please execute: `npm run test`

Make sure to start the storybook dev server to run tests.&#x20;

In the pipeline, we use: [this command](https://github.com/RahulARanger/handshake/blob/a829ab31eddfe16bb431a8290bceb183767dd24f/.github/workflows/test-build.yml#L72)

#### Build&#x20;

Make sure to run `npm run build` to check if we can generate the static export successfully.

</details>
