Skip to content

Guidewire/fern-reporter

Repository files navigation

OpenSSF Scorecard Coverage

Fern

GitHub contributors

Introduction

Welcome to the Fern Project, an innovative open-source solution designed to enhance Ginkgo test reports. This project is focused on capturing, storing, and analyzing test data to provide insights into test performance and trends. The Fern Project is ideal for teams using Ginkgo, a popular BDD-style Go testing framework, offering a comprehensive overview of test executions and performance metrics.

Key Features:

  1. Historical Test Data Tracking: Stores detailed records of tests run against various projects, providing a historical view of testing efforts.
  2. Latency and Performance Metrics: Captures the time taken for each "It" block in Ginkgo tests, aiding in identifying performance bottlenecks.
  3. Data-Driven Analytics (To be implemented): Future feature to leverage data for analytics, including identification of frequently failing tests.
  4. Coverage and Test Evolution Analysis (To be implemented): Planned feature to offer insights into test coverage and the evolution of tests over time.
  5. Authorized Access to Test Reports (To be implemented): Upcoming feature to ensure secure access to test reports.

Installation and Setup

Fern is a Golang Gin-based API that connects to a PostgreSQL database. It is designed to store metadata about Ginkgo test suites and has two main components:

  1. API Server: A central server that stores test metadata. It needs to be deployed independently.
  2. Client Library: Integrated into Ginkgo test suites to send test data to the API server.

Setting Up the API Server

Prerequisites

  • Golang environment.
  • Docker for running the PostgreSQL database.
  • Install gox for building the binary
    go install github.com/mitchellh/gox@latest

Deployment

  1. Clone the Fern Repository: Clone the repository to your local machine.
    git clone git@github.com:Guidewire/fern-reporter.git
  2. Start the API Server: Navigate to the project directory and start the server.
    cd fern-reporter
    make docker-run-local

Integrating the Client into Ginkgo Test Suites

Refer the client repository to integrate the client to Ginkgo Test Suites: https://github.com/Guidewire/fern-ginkgo-client

  1. Run Your Tests: After adding the client, run your Ginkgo tests normally.

Accessing Test Reports

  • View reports at http://[your-api-url]/reports/testruns.
  • If using make docker-run, reports are available at http://localhost:8080/reports/testruns.

Additional Resources

🤩 Thanks to all our Contributors

Thanks to everyone, that is supporting this project. We are thankful, for evey contribution, no matter its size!