command
Version:
v0.0.0-...-8cb7ee9
Opens a new window with list of versions in this module.
Published: Oct 26, 2024
License: AGPL-3.0
Opens a new window with license information.
Imports: 20
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
difftest
This tool finds tests which were changed since a previous git revision.
Usage
To see changes:
difftest diff --path . --branch master
To get go test
flags to run only newly appeared tests:
difftest test --path . --branch master --exclude-updates
How it works
- Calls
git diff $(git merge-base --fork-point <branch>)
- Filters all added/modified files ending with
_test.go
.
- Builds a map of
Test*
methods in every file.
- Calculates
SHA1
hash of each method body.
- Does the same for the counterpart files at the fork point.
- Compares the results. If a method was not there previously, it's marked as new. If a method's contents was changed, it is marked as changed.
testify/suite
support
-
Tool detects suite start signatures like the following:
func TestSingleSuite(t *testing.T) { suite.Run(t, &SingleSuite{}) }
where suite
references to testify/suite
package, and t
references testing
package.
-
All methods related to a single suite must be in the same package (directory).
-
All suite parts must redside in a files matching *_test.go
pattern.
-
If a test method has a receiver, which was not detected as a testify/suite
previously, such method got skipped.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.