Giter Club home page Giter Club logo

ekohanchi / testrailreporting Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 3.0 866 KB

A java spring boot application that reports testrail manual vs automated cases in a tablular format. Also contains endpoints that display test status results and automation coverage results via a pie chart. Other technologies included within this project include: freemarker & bootstrap.

Java 43.52% CSS 1.46% FreeMarker 55.02%
graphical war spring-boot testrail-reporting automated-tests

testrailreporting's Introduction

TestRail-Reporting

This is a spring boot application, that makes a call to the testrail api and retrievs a list of all projects and within a table displays the total count of test cases, total count of automated test cases, and percentage of automated test cases. In order for the application to start up correctly it must first be configured.

Setup

In order to support a faster load time for project metrics when the home page is called, the data is stored into an instance of MySQL DB as part of a scheduled job call to the /loaddata endpoint. The call to the endpoint is currently set to run on the following cron schedule:

0 0 */3 * * * - β€œAt minute 0 past every 3rd hour.”

it can be changed in the ScheduledTasks class (currently not configurable via a properties file).

MySQL

Start up an instance of MySQL and set up a database and credentials as follows:

create database testrailReporting;
create user 'reportuser'@'%' identified by '{specify_password}';
grant all on testrailReporting.* to 'reportuser'@'%';

Configure - Application

# create a directory called conf
$ mkdir conf
$ cd conf
# within the directory create a file called application.properties
$ vim application.properties

Within the file the following content should be added:

testrail.baseurl={YOUR_URL_DOMAIN_FOR_TESTRAIL}
testrail.username={YOUR_USERNAME_FOR_TESTRAIL}
testrail.password={YOUR_PASSWORD_FOR_TESTRAIL}
page.logopath={PATH_TO_IMAGE_IN src.main.resources.static.img - i.e. img/images.png}

# Values for custom test case statuses
testrail.status.customstatus1={"Custom Status 1"}
testrail.status.customstatus2={"Custom Status 2"}
testrail.status.customstatus3={"Custom Status 3"}
testrail.status.customstatus4={"Custom Status 4"}
testrail.status.customstatus5={"Custom Status 5"}
testrail.status.customstatus6={"Custom Status 6"}
testrail.status.customstatus7={"Custom Status 7"}

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/testrailReporting?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=PST
spring.datasource.username=reportuser
spring.datasource.password={specify_password}

Create an environment variable called TESTRAIL_REPORT_HOME and point it to where the conf directory is located

$ vim ~/.bash_profile
export TESTRAIL_REPORT_HOME={PATH_TO_CONF_DIRECTORY}
$ . ~/.bash_profile

Configure - TestRail

In order for this application to work optimally, the following configuration changes need to be made to your TestRail instance:

  • within Administration > Customizations
  • add a new field called "Automation"
  • the type for this new field should be a Dropdown
  • the options for this field should be:
1, Automated
2, Not Automated
3, Not Automatable
  • default value should be set to: "Not Automated"

Startup

To start up the application:

mvn spring-boot:run

Build as war file

To build the application as a war file:

mvn clean package

Access

To access the application, on your browser navigate to: http://localhost:8080

Endpoint Usage

Broad Status Report: Provides graphical status of test runs for given testRunIds, i.e. pass/fail/untested. testRunIds are required. This method can be used for either a single or multiple test runs across different projects.

  • URL:
/runallstatusreport?testRunIds={testRunId1,testRunId2,testRunId3}
  • Method: GET

Status Report: Provides graphical status of test run for a given testRunId, i.e. pass/fail/untested. testRunId is required.

  • URL:
/runstatusreport?testRunId={testRunId}
  • Method: GET

Type Report: Provides graphical view of the different types of test cases for a given testRunId, i.e. manual/automated.

  • URL:
/runtypereport?testRunId={testRunId}
  • Method: GET

Screenshots

View of the home page when the application is first started up: Home Page View of the 'Close Test Runs' page which can be used to close all test runs within a given project id: Close All Test Runs A call to the 'Broad Status Report' endpoint which can be used to get the status of test runs across different projects Broad Status Report

testrailreporting's People

Contributors

ekohanchi avatar kanstantsinsudzilouski avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.