Skip to content

An api client for to be used in Ginkgo to send test information to fern-reporter

License

Notifications You must be signed in to change notification settings

guidewire-oss/fern-ginkgo-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Integrating the Client into Ginkgo Test Suites

  1. Add the Fern dependency to your test project:

    go get -u github.com/guidewire-oss/fern-ginkgo-client
  2. Add the Fern Client to your Ginkgo test suite:

    Import the fern client package

    import fern "github.com/guidewire-oss/fern-ginkgo-client/pkg/client"
    var _ = ReportAfterSuite("", func(report Report) {
        f := fern.New("Example Test",
            fern.WithBaseURL("http://localhost:8080/"),
        )
    
        err := f.Report("example test", report)
    
        Expect(err).To(BeNil(), "Unable to create reporter file")
    })

    Replace http://localhost:8080/ with your API server's URL and specify the project name in f.Report.

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

    How to execute the tests :

    make test
    

    To add flags to test suits : The flag is added to file : tests/adder_suite_test.go

  Example : 
  RunSpecs(t, "Adder Suite", Label("this-is-a-suite-level-label","anotherFlag"))
The fern report will have the test report along with the labels.

See Also

  1. Fern UI
  2. Fern Ginkgo Reporter

About

An api client for to be used in Ginkgo to send test information to fern-reporter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published