A mature testing framework for Go designed to help you write expressive specs
Overall
score
97%
Create a build automation utility that precompiles test suites into standalone binaries for distribution and execution in different environments. The utility should support building test suites with appropriate naming conventions, handle recursive directory traversal, and execute the precompiled binaries with proper configuration.
A mature testing framework for Go designed to help you write expressive specs.
Implement a program that can:
The program should be able to:
Given a directory containing a Ginkgo test suite, when the build utility is invoked on that directory, it should create a precompiled test binary with an appropriate name (e.g., package.test for a package named "package").
Setup:
calculator/calculator_suite_test.go:package calculator_test
import (
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestCalculator(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Calculator Suite")
}
var _ = Describe("Calculator", func() {
It("should add numbers", func() {
Expect(2 + 2).To(Equal(4))
})
})Expected behavior:
calculator.test is created in the calculator directoryGiven a directory structure with multiple test suites in subdirectories, when the build utility is invoked with recursive mode, it should build all test suites in the directory tree.
Setup:
math/addition/addition_test.go (test suite for addition)math/subtraction/subtraction_test.go (test suite for subtraction)Expected behavior:
math/addition/addition.test and math/subtraction/subtraction.testWhen a precompiled test binary is executed, it should accept configuration flags and run accordingly.
Setup:
Expected behavior:
-v)Install with Tessl CLI
npx tessl i tessl/golang-github-com-onsi-ginkgo-v2docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10