Publish Jest report in OneDev

OneDev is an open source GitLab-like devops platform emphasizing easy-of-use. Jest is a popular javascript testing framework. This tutorial explains how to set up OneDev to publish Jest test report in a CI process.

Run OneDev

Run below command in your terminal on Linux/Mac to start OneDev:

Then point your browser to http://localhost:6610 to set up OneDev following on-screen instructions.

Add a Demo Project

Now add a project in OneDev using Jest test framework, and push the code. For demonstration purpose, let’s use the react project

  1. Create a project in OneDev with name react:

2. Push the code into newly created project:

Run Test and Publish Report

1. Refresh the page after pushing code, and add build spec for the demo project like below:

2. Switch to Edit Source tab to use below source (do not worry about the build spec syntax, you may also use the GUI editor to set up necessary steps and triggers):

After build spec is committed, OneDev will run the job automatically. Note that Jest runs slowly on Docker on Mac. The build may take 30~60 minutes to complete. Visit the online demo page to see the report in action if you do not want to wait.

Access Jest Report

After build is finished, the Jest test report will be available in build detail page. Here we can filter tests by status and file path, view test trends by day, or jump to error position in file.

DevOps enthusiast. OneDev maintainer.