Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !189

Add TestNG support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/dcposch/testng into master Sep 03, 2014
  • Overview 19
  • Commits 3
  • Pipelines 0
  • Changes 37

Created by: dcposch

Here's my first cut at adding support for TestNG. For a short intro into what TestNG is and why some teams prefer it over JUnit, see this comparison: http://www.mkyong.com/unittest/junit-4-vs-testng-comparison/

I added a type option to java_test. Supported values are "junit" and "testng". The default is "junit", so existing java_test rules should work as before.

To avoid duplication, I've extracted a BaseRunner class for shared functionality between JUnitRunner and TestNGRunner.

If this change happens, we might want to rename JUnitStep to UnitTestStep, and so on. That would create a bigger diff though so to make it easy to see what's going on I haven't done that here.

I've used this on a codebase with a few hundred TestNG tests. It's much faster than Gradle! Hooray! Admittedly that doesn't say much :)

image

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/dcposch/testng