Skip to content

babakks/vscode-go-test-suite

Repository files navigation

Go Test Suite Support

Run Go test functions written in third-party library formats (e.g., gocheck) from the Testing sidebar.

Features

  • Run/debug tests by clicking on the Code Lens button appearing above test functions.

Supported test libraries

Notes

  • go-check might need you to include this bootstrap function in your test packages:

    // Hook up go-check into the "go test" runner.
    func Test(t *testing.T) { 
        check.TestingT(t) 
    }
    
    type myTestSuite struct {
    }
    
    var _ = check.Suite(&myTestSuite{})
    
    func (s *myTestSuite) TestSomething(c *check.C) {
      // ...
    }
  • quicktest and qtsuite might need you to include this bootstrap function in your test packages (given that your test suite struct is named myTestSuite):

    // Register your test suite's functions as subtests.
    func Test(t *testing.T) { 
      qtsuite.Run(quicktest.New(t), &myTestSuite{})
    }
    
    type myTestSuite struct {
    }
    
    func (s *myTestSuite) TestSomething(c *quicktest.C) {
      // ...
    }

Feedback

Please kindly provide your feedbacks and/or suggestions by submitting a new issue in the extension's GitHub repository. 🍏

About

VS Code extension to click and run Go test functions written in third-party library formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published