golo-lang icon indicating copy to clipboard operation
golo-lang copied to clipboard

Testing Module

Open danielpetisme opened this issue 9 years ago • 1 comments

This PR aims to track the discussion, updates regarding the Golo Testing module.

TODO

  • [x] feat:CLI integration
  • [x] feat:Gradle Integration
  • [ ] feat:Allow specification definition through a @spec decoration
  • [ ] refactor: Refactor CLI with the CLI Command (recursive visit, class loading, main/spec method invocation)
  • [ ] fix: Improve Gradle integration
  • [x] fix: The testing api should accessible via gololang.Testing only
  • [ ] feat: beforeEach/afterEach & beforeAll/afterAll
  • [ ] feat: Disable a suite/test with the x prefix
  • [x] feat: Basic console reporting
  • [ ] feat: JUnit reporting
  • [ ] feat: HTML reporting
  • [ ] feat: Track test status (disabled, pending, running, success & failure)
  • [ ] feat: Documentation

Currently the following snippet works (see ./src/test/golo/testingSpec.golo) and can be ran via ./gradlew golotest

module gololang.TestingSpec

import gololang.Testing

function spec = |$| {
  $: describe("A suite", {
    $: it("A test", {
      require(1 is 1, "it works")
      println("It works")
    })
  })
}

danielpetisme avatar Oct 25 '15 14:10 danielpetisme

The PR is not mature but I would appreciate some comments/reviews on the following topics:

  • CLI integration
  • gradle integration (I'm not an expert at all)
  • Design (the runner -> suite -> test relations)
  • The reporting process (in live as is done right now VS. a post-execution reporting)
  • code review
  • file structure (1 file per module, module names, etc)

I'm really Java/OOP oriented so I created structs almost everywhere ;)

So far the code actually work just as in the snippet in the 1st comment

Have fun!

danielpetisme avatar Dec 30 '15 10:12 danielpetisme