stryker-mutator / stryker-dashboard

See your mutation testing reports from anywhere 🚀
https://dashboard.stryker-mutator.io/
Apache License 2.0
23 stars 19 forks source link
hacktoberfest
Stryker logo

Stryker Dashboard

Mutation testing badge Build Status Slack Chat

Stryker Dashboard is the place to host your mutation testing reports online - with the added bonus of getting to show your mutation score as a badge in your repository!

Local development

Requirements

First things first, there's always something before you can start.

To make our life easier, we use NPM a lot. Make sure you have it installed.

Azure Storage

We store our data in Azure Storage, so you need to be able to do so as well. For local development (Windows, Mac and Linux), you can use Azurite.

GitHub OAuth application

Register a new OAuth application. This will allow users to connect to their GitHub account.

Depending on what you are doing, use the port 1337 (backend port) or 4200 (frontend port) in the Authorization callback URL: http://localhost:{preferred_port}/auth/github/callback.

Build the application

Building the application is easy. First run npm install && npm run build, to build the application.

Configuration

Next, you need to define the following environment variables in a .env file. An example file is located in the packages/website-backend folder.

Variable Example Explanation Required
AZURE_STORAGE_CONNECTION_STRING DefaultEndpointsProtocol... Azure-issued String to connect to your Azure Storage. Yes
GH_BASIC_CLIENT_ID 1234567890abcdef1234 GitHub-issued Client ID. Yes
GH_BASIC_SECRET_ID 1234567890...abcdef1 GitHub-issued Client Secret. Yes
JWT_SECRET u7apm8MrMBe8Fwrx4uMH The secret for the HMAC algorithm that creates the signature of the JWT. Yes
NODE_ENV development Node setting for production environment. Used by us for some SSL settings. Can be either: production (default) or development. No

Start the backend

Before running the backend, start Azurite first to emulate Azure storage:

  1. npm run start:azurite (in the root of the project).

To start the backend, navigate to the website-backend package first:

  1. cd packages/website-backend.

After doing this, simply run the backend by running the following command:

  1. npm run start or npm run start:watch (to automatically refresh the backend when making changes).

The backend should now be available at http://localhost:1337.

(Optional) Start the frontend

Note: it is expected that the backend is running.

To start the front-end, navigate to the website-frontend package first:

  1. cd packages/website-frontend.

After doing this, simply run the frontend by running the following command:

  1. npm run watch

The frontend should now be availabe at http://localhost:4200.

(Optional) Start storybook

We use Lit for most of our components. These components are defined in the stryker-elements package. To develop these components, we use Storybook.

To run Storybook, navigate to the packages/stryker-elements first:

  1. cd packages/stryker-elements.

Before running Storybook, run Vite first:

  1. npm run build:watch.

To run storybook, use the following command:

  1. npm run start.

(Optional) Running End to End tests

See e2e/README.md.

Contributing

See CONTRIBUTING.md.