GithubHelp home page GithubHelp logo

edk / junit_visualizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avvo/junit_visualizer

1.0 2.0 0.0 23.37 MB

Rails app to present junit test data

Ruby 79.87% JavaScript 1.60% CSS 0.83% HTML 17.56% Shell 0.15%

junit_visualizer's Introduction

JUnit Visualizer

This project reads JUnit XML files from S3 and compiles that data to provide an interactive UI summarizing your test performance and stability. This is useful for improving test run performance and for finding your transient/flaky tests.

CircleCI can provide JUnit files if you use their gem in your rails projects.

Setup

Create your DB:

rake db:setup

Provide these environment variables:

  • AWS_BUCKET (where you want to read the JUnit files from)
  • AWS_REGION (for the bucket above)
  • S3_ACCESS_KEY_ID
  • S3_SECRET_ACCESS_KEY

We use mysql and redis. You may need to set related environment variables for those (they have defaults):

  • REDIS_HOST
  • REDIS_PORT
  • DB_HOST
  • DB_PORT
  • DB_USER
  • DB_PASS

For production you need to set SECRET_KEY_BASE

This project is available in a docker image: https://hub.docker.com/r/avvo/junit_visualizer/

How it works

JUnit Visualizer will inspect the bucket you provide, creating a "project" for each parent level directory. For example, in a bucket called ci-logs you have:

  project-1/SUITE=my_suite_1/sub_directory/build_number_123/some/other/path/test.xml
  project-1/SUITE=my_suite_1/sub_directory/build_number_124/some/other/path/test.xml
  project-1/SUITE=my_suite_2/build_number_123/some/other/path/test.xml
  project-1/SUITE=my_suite_2/build_number_124/some/other/path/test.xml
  project-2/build_number_1/test.xml

This would create 2 projects, the first one with 2 suites, the second with a default suite.

S3 setup

The directory structure should follow this pattern: /(/(Suite sub directory))/build_number_####/**/.xml

If the project has a suite, all of the build directories must be in a suite. If you don't have a suite, the build directories can be directly under the parent.

We recommend that you create a retention policy to delete the files after 30 days. This will help keep the pulling process as light as possible. Your data will still be available in the local db.

circle_dropper can help transfer your CircleCI files to S3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.