Full-featured test framework for Go! Assertions, mocking, input testing, output capturing, and much more! 🍕

testza 🍕

Testza is like pizza for Go - you could life without it, but why should you?

Latest Release Tests Coverage Unit test count Issues License: MIT


Get The Module | Documentation | Contributing | Code of Conduct


Screenshot of an example test message

Installation

# Execute this command inside your project
go get github.com/MarvinJWendt/testza

Description

Testza is a full-featured testing framework for Go. It integrates with the default test runner, so you can use it with the standard go test tool. Testza contains easy to use methods, like assertions, output capturing, mocking, and much more.

Testza is structured a bit differently than you might be used to in Go, but we think that it makes writing tests as easy and efficient as possible.
After all, writing tests should be very simple and should not require you to study a whole framework.
That's why we made testza to integrate perfectly with your IDE. You don't even have to lookup the documentation, as testza is self-explanatory.

Getting Started

Testza is very IDE friendly and was made to integrate with your IDE to increase your productivity.

Testza package
   |    ┌ Container for all testza modules
   |    |The module you want to use (Press Ctrl+Space to see a list of all modules)
testza.Use.XXXXXXX


// --- Some Examples ---

// - Some assertions -
testza.Use.Assert.True(t, true) // -> Pass
testza.Use.Assert.NoError(t, err) // -> Pass
testza.Use.Assert.Equal(t, object, object) // -> Pass
// ...

// - Testing console output -
// Test the output of your CLI tool easily!
terminalOutput, _ := testza.Use.Capture.Stdout(func(w io.Writer) error {fmt.Println("Hello"); return nil})
testza.Use.Assert.Equal(t, terminalOutput, "Hello\n") // -> Pass

// - Mocking -
// Testing a function that accepts email addresses as a parameter:

// Testset of many different email addresses
emailAddresses := testza.Use.Mock.Strings.EmailAddresses()

// Run a test for every string in the test set
testza.Use.Mock.Strings.RunTests(t, emailAddresses, func(t *testing.T, index int, str string) {
  user, domain, err := internal.ParseEmailAddress(str) // Use your function
  testza.Use.Assert.NoError(t, err) // Assert that your function does not return an error
  testza.Use.Assert.NotZero(t, user) // Assert that the user is returned
  testza.Use.Assert.NotZero(t, domain) // Assert that the domain is returned
})

// And that's just a few examples of what you can do with Testza!

Documentation

Module Methods
Assert
Click to expand
Capture
Click to expand
Mock.Inputs.Strings
Click to expand
Mock.Inputs.Bools
Click to expand
Mock.Inputs.Floats64
Click to expand
Mock.Inputs.Ints
Click to expand

Assert

testza.Use.Assert.CompletesIn

func CompletesIn(t testRunner, duration time.Duration, f func(), msg ...interface{})

CompletesIn asserts that a function completes in a given time. Use this function to test that functions do not take too long to complete.

NOTE: Every system takes a different amount of time to complete a function. Do not set the duration too low, if you want consistent results.

testza.Use.Assert.Contains

func Contains(t testRunner, object, element interface{}, msg ...interface{})

testza.Use.Assert.Equal

func Equal(t testRunner, expected interface{}, actual interface{}, msg ...interface{})

Equal asserts that two objects are equal.

testza.Use.Assert.EqualValues

func EqualValues(t testRunner, expected interface{}, actual interface{}, msg ...interface{})

EqualValues asserts that two objects have equal values.

testza.Use.Assert.False

func False(t testRunner, value interface{}, msg ...interface{})

False asserts that an expression or object resolves to false.

testza.Use.Assert.Greater

func Greater(t testRunner, object1, object2 interface{}, msg ...interface{})

Greater asserts that the first object is greater than the second.

testza.Use.Assert.Implements

func Implements(t testRunner, interfaceObject, object interface{}, msg ...interface{})

Implements checks if an objects implements an interface.

testza.Use.Assert.Implements(t, (*YourInterface)(nil), new(YourObject))
testza.Use.Assert.Implements(t, (*fmt.Stringer)(nil), new(types.Const)) => pass

testza.Use.Assert.KindOf

func KindOf(t testRunner, expectedKind reflect.Kind, object interface{}, msg ...interface{})

KindOf asserts that the object is a type of kind exptectedKind.

testza.Use.Assert.Less

func Less(t testRunner, object1, object2 interface{}, msg ...interface{})

Less asserts that the first object is less than the second.

testza.Use.Assert.Nil

func Nil(t testRunner, object interface{}, msg ...interface{})

Nil asserts that an object is nil.

testza.Use.Assert.NoError

func NoError(t testRunner, err interface{}, msg ...interface{})

NoError asserts that an error is nil.

testza.Use.Assert.NotCompletesIn

func NotCompletesIn(t testRunner, duration time.Duration, f func(), msg ...interface{})

NotCompletesIn asserts that a function does not complete in a given time. Use this function to test that functions do not complete to quickly. For example if your database connection completes in under a millisecond, there might be something wrong.

NOTE: Every system takes a different amount of time to complete a function. Do not set the duration too high, if you want consistent results.

testza.Use.Assert.NotContains

func NotContains(t testRunner, object, element interface{}, msg ...interface{})

testza.Use.Assert.NotEqual

func NotEqual(t testRunner, expected interface{}, actual interface{}, msg ...interface{})

NotEqual asserts that two objects are not equal.

testza.Use.Assert.NotEqualValues

func NotEqualValues(t testRunner, expected interface{}, actual interface{}, msg ...interface{})

NotEqualValues asserts that two objects do not have equal values.

testza.Use.Assert.NotImplements

func NotImplements(t testRunner, interfaceObject, object interface{}, msg ...interface{})

NotImplements checks if an object does not implement an interface.

testza.Use.Assert.NotImplements(t, (*YourInterface)(nil), new(YourObject))
testza.Use.Assert.NotImplements(t, (*fmt.Stringer)(nil), new(types.Const)) => fail, because types.Const does implement fmt.Stringer.

testza.Use.Assert.NotKindOf

func NotKindOf(t testRunner, kind reflect.Kind, object interface{}, msg ...interface{})

NotKindOf asserts that the object is not a type of kind kind.

testza.Use.Assert.NotNil

func NotNil(t testRunner, object interface{}, msg ...interface{})

NotNil assertsthat an object is not nil.

testza.Use.Assert.NotNumeric

func NotNumeric(t testRunner, object interface{}, msg ...interface{})

Number checks if the object is not a numeric type. Numeric types are: Int, Int8, Int16, Int32, Int64, Float32, Float64, Uint, Uint8, Uint16, Uint32, Uint64, Complex64 and Complex128.

testza.Use.Assert.NotPanic

func NotPanic(t testRunner, f func(), msg ...interface{})

NotPanic asserts that a function does not panic.

testza.Use.Assert.NotZero

func NotZero(t testRunner, value interface{}, msg ...interface{})

NotZero asserts that the value is not the zero value for it's type.

assert.NotZero(t, 1337)
assert.NotZero(t, true)
assert.NotZero(t, "Hello, World")

testza.Use.Assert.Numeric

func Numeric(t testRunner, object interface{}, msg ...interface{})

Numeric asserts that the object is a numeric type. Numeric types are: Int, Int8, Int16, Int32, Int64, Float32, Float64, Uint, Uint8, Uint16, Uint32, Uint64, Complex64 and Complex128.

testza.Use.Assert.Panic

func Panic(t testRunner, f func(), msg ...interface{})

Panic asserts that a function panics.

testza.Use.Assert.True

func True(t testRunner, value interface{}, msg ...interface{})

True asserts that an expression or object resolves to true.

testza.Use.Assert.Zero

func Zero(t testRunner, value interface{}, msg ...interface{})

Zero asserts that the value is the zero value for it's type.

assert.Zero(t, 0)
assert.Zero(t, false)
assert.Zero(t, "")

Capture

testza.Use.Capture.Stderr

func Stderr(capture func(w io.Writer) error) (string, error)

Stderr captures everything written to stderr from a specific function. You can use this method in tests, to validate that your functions writes a string to the terminal.

testza.Use.Capture.Stdout

func Stdout(capture func(w io.Writer) error) (string, error)

Stdout captures everything written to stdout from a specific function. You can use this method in tests, to validate that your functions writes a string to the terminal.

Mock.Inputs.Bools

testza.Use.Mock.Inputs.Bools.Full

func Full() []bool

Full returns true and false in a boolean slice.

Mock.Inputs.Floats64

testza.Use.Mock.Inputs.Floats64.Full

func Full() (floats []float64)

testza.Use.Mock.Inputs.Floats64.GenerateRandomNegative

func GenerateRandomNegative(count int, min float64) (floats []float64)

GenerateRandomNegative generates random negative integers with a minimum of min. If the minimum is positive, it will be converted to a negative number. If it is set to 0, there is no limit.

testza.Use.Mock.Inputs.Floats64.GenerateRandomPositive

func GenerateRandomPositive(count int, max float64) (floats []float64)

GenerateRandomPositive generates random positive integers with a maximum of max. If the maximum is 0, or below, the maximum will be set to math.MaxInt64.

testza.Use.Mock.Inputs.Floats64.GenerateRandomRange

func GenerateRandomRange(count int, min, max float64) (floats []float64)

GenerateRandomRange generates random positive integers with a maximum of max. If the maximum is 0, or below, the maximum will be set to math.MaxInt64.

testza.Use.Mock.Inputs.Floats64.Modify

func Modify(inputSlice []float64, f func(index int, value float64) float64) (floats []float64)

Modify returns a modified version of a test set.

Mock.Inputs.Ints

testza.Use.Mock.Inputs.Ints.Full

func Full() (ints []int)

Full returns a combination of every integer testset and some random integers (positive and negative).

testza.Use.Mock.Inputs.Ints.GenerateRandomNegative

func GenerateRandomNegative(count, min int) (ints []int)

GenerateRandomNegative generates random negative integers with a minimum of min. If the minimum is 0, or above, the maximum will be set to math.MinInt64.

testza.Use.Mock.Inputs.Ints.GenerateRandomPositive

func GenerateRandomPositive(count, max int) (ints []int)

GenerateRandomPositive generates random positive integers with a maximum of max. If the maximum is 0, or below, the maximum will be set to math.MaxInt64.

testza.Use.Mock.Inputs.Ints.GenerateRandomRange

func GenerateRandomRange(count, min, max int) (ints []int)

GenerateRandomRange generates random integers with a range of min to max.

testza.Use.Mock.Inputs.Ints.Modify

func Modify(inputSlice []int, f func(index int, value int) int) (ints []int)

Modify returns a modified version of a test set.

Mock.Inputs.Strings

testza.Use.Mock.Inputs.Inputs.Strings.EmailAddresses

func EmailAddresses() []string

EmailAddresses returns a test set with valid email addresses.

testza.Use.Mock.Inputs.Inputs.Strings.Empty

func Empty() []string

Empty returns a test set with a single empty string.

testza.Use.Mock.Inputs.Inputs.Strings.Full

func Full() (ret []string)

Full contains all string test sets plus ten generated random strings.

testza.Use.Mock.Inputs.Inputs.Strings.GenerateRandom

func GenerateRandom(count, length int) (result []string)

GenerateRandom returns random StringsHelper in a test set.

testza.Use.Mock.Inputs.Inputs.Strings.HtmlTags

func HtmlTags() []string

HtmlTags returns a test set with html tags.

testza.Use.Mock.Inputs.Inputs.Strings.Limit

func Limit(testSet []string, max int) []string

Limit limits a test set in size.

testza.Use.Mock.Inputs.Inputs.Strings.Modify

func Modify(inputSlice []string, f func(index int, value string) string) (ret []string)

Modify returns a modified version of a test set.

testza.Use.Mock.Inputs.Inputs.Strings.Numeric

func Numeric() []string

Numeric returns a test set with strings that are numeric. The highest number in here is "9223372036854775807", which is equal to the maxmim int64.

testza.Use.Mock.Inputs.Inputs.Strings.RunTests

func RunTests(t testRunner, testSet []string, testFunc func(t *testing.T, index int, str string))

RunTests runs tests with a specific test set.


Made with ❤️ by @MarvinJWendt and contributors! | MarvinJWendt.com

Owner
Marvin Wendt
--- Fullstack Developer --- Skills: Go, TypeScript, JavaScript, Java Languages: German, English
Marvin Wendt
Comments
  • Directories created with `testza.SnapshotCreateOrValidate` do not have execute permissions set

    Directories created with `testza.SnapshotCreateOrValidate` do not have execute permissions set

    When using the following:

    err = testza.SnapshotCreateOrValidate(t, t.Name(), string(result))
    testza.AssertNoError(t, err)
    

    The first run succeeds and creates a snapshot. The second test run fails with the error:

    "stat /[path redacted]/testdata/snapshots/TestReports/test_name.testza: permission denied"
    

    Running ls -l on the parent directory shows drw------- for the testdata directory.

    AFAICT, there are two paths for creating directories in snapshot.go: via SnapshotCreate, which ends up calling os.MkdirAll(dir, 0755).

    https://github.com/MarvinJWendt/testza/blob/77ba3a4a1fd8f7de13711106f004362c54ad0846/snapshot.go#L30-L34

    The second, via SnapshotCreateOrValidate, calls os.MkdirAll(path.Dir(snapshotPath), 0600):

    https://github.com/MarvinJWendt/testza/blob/77ba3a4a1fd8f7de13711106f004362c54ad0846/snapshot.go#L130-L135

    If I understand this correctly, the issue is that the permissions bits on the second call should match the first.

  • feat(assert): added AssertDirEmpty and AssertDirNotEmpty. fixes #37

    feat(assert): added AssertDirEmpty and AssertDirNotEmpty. fixes #37

    Adds AssertDirEmpty, AssertDirNotEmpty by checking for io.EOF to assert an empty directory or not. This is more efficient than retrieving a slice of the objects in the directory.

    I think everything here works, please let me know if I missed anything obvious or this is missing something.

    Thank you!

  • Remove capacity from snapshots

    Remove capacity from snapshots

    Changes the snapshot functionality such that capacities for slices are no longer emitted into the created snapshot files. Slice capacities can vary across different runtimes, creating the potential for intermittent snapshot comparison failures.

    While this doesn't break the API surface, it does change behaviour is such a way that will cause existing tests that save capacities to fail when they update the library version. Given the test instability that cap can introduce, my preference would be to go ahead outside of a v2 style version upgrade, but I'd like to get your feedback.

    Another point of possible contention is that Arrays also have a capacity which is not variable, and there is a possibility that varying such a capacity would be a semantic error that a user of the library would want to catch.

    Fixes #184

    Notes

    In order to make this change safely, I've introduced an additional test to expose the behaviour, and pulled the Sdump() calls into a separate function. This allows for the use ofof go-spew's ConfigState struct instead of the global config. This makes varying configuration more straightforward, as it doesn't need to be restored, and removes the possibility of strange errors caused by concurrency in tests.

  • chore(deps): bump github.com/pterm/pterm from 0.12.36 to 0.12.39

    chore(deps): bump github.com/pterm/pterm from 0.12.36 to 0.12.39

    Bumps github.com/pterm/pterm from 0.12.36 to 0.12.39.

    Release notes

    Sourced from github.com/pterm/pterm's releases.

    v0.12.39

    What's Changed

    Exciting New Features 🎉

    Other Changes

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.38...v0.12.39

    v0.12.38

    What's Changed

    Exciting New Features 🎉

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.37...v0.12.38

    v0.12.37

    What's Changed

    Exciting New Features 🎉

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.36...v0.12.37

    Changelog

    Sourced from github.com/pterm/pterm's changelog.

    [v0.12.39] - 2022-03-18

    Features

    • use fallback color in BigTextPrinter when RGB is not supported

    Test

    • fix BigTextPrinter test
    • removed testdata
    • removed snapshot testing

    [v0.12.38] - 2022-03-09

    Features

    • added NewLettersFromStringWithRGB
    • added NewLettersFromStringWithRGB

    Test

    • bigtext: fix formatting error in bigtext test

    [v0.12.37] - 2022-02-17

    Features

    • progressbar: Add option to set the MaxWidth of the progressbar

    Test

    • progressbar: added 100% test coverage for new features

    Code Refactoring

    • putils: Improved styling

    Commits
    • 2bfb950 Merge pull request #331 from pterm/330-use-fallback-style-when-using-rgb-in-a...
    • a99d307 test: fix BigTextPrinter test
    • 0c60941 feat: use fallback color in BigTextPrinter when RGB is not supported
    • 6e950d6 docs: autoupdate
    • 2bd2998 Merge pull request #329 from pterm/add-discord-link-to-readme
    • 3631d06 docs(readme): added discord link to readme
    • 06b9bdb docs: autoupdate
    • 4353f36 Merge pull request #328 from pterm/remove-snapshot-testing
    • 54aaa44 test: removed testdata
    • b8c55f2 test: removed snapshot testing
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Add getters for setters in configuration.go

    Add getters for setters in configuration.go

    Added getters for settings in configuration.go:

    func GetColorsEnabled() bool
    func GetLineNumbersEnabled() bool
    func GetRandomSeed() int64
    func GetShowStartupMessage() bool
    func GetDiffContextLines() int
    

    closes #111

  • build(deps): bump github.com/pterm/pterm from 0.12.40 to 0.12.46

    build(deps): bump github.com/pterm/pterm from 0.12.40 to 0.12.46

    Bumps github.com/pterm/pterm from 0.12.40 to 0.12.46.

    Release notes

    Sourced from github.com/pterm/pterm's releases.

    v0.12.46

    What's Changed

    Exciting New Features 🎉

    Fixes 🔧

    Other Changes

    New Contributors

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.45...v0.12.46

    v0.12.45

    What's Changed

    Fixes 🔧

    New Contributors

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.44...v0.12.45

    v0.12.44

    What's Changed

    Exciting New Features 🎉

    New Contributors

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.43...v0.12.44

    v0.12.43

    What's Changed

    Fixes 🔧

    ... (truncated)

    Changelog

    Sourced from github.com/pterm/pterm's changelog.

    [Unreleased]

    Features

    • putils: add CenterText in putils

    Bug Fixes

    • textinput: fixed overwriting the default values

    [v0.12.45] - 2022-07-26

    Bug Fixes

    • make sure the interactive printers can cleanup after Ctrl+C
    • the interactive confirm answers should match the confirm/reject text

    Test

    • add tests for custom answers

    [v0.12.44] - 2022-07-22

    [v0.12.43] - 2022-07-17

    Bug Fixes

    • spinner: fix line didn't clear properly
    • table: fixed column length calculation for Chinese strings

    [v0.12.42] - 2022-06-21

    Features

    • input: added text input printer

    [v0.12.41] - 2022-04-12

    Commits
    • 3cd12db docs: autoupdate
    • da3b3f5 Merge pull request #399 from pterm/putils_center_text
    • 5bad05a docs(putils): add CenterText in docs
    • e706b12 feat(putils): add CenterText in putils
    • b33cb19 docs: autoupdate
    • 12bd74e Merge pull request #398 from pterm/387-user-input-reappears-with-interactivet...
    • 317f2bf fix(textinput): fixed overwriting the default values
    • 63b9d9e docs: autoupdate
    • 454a6f0 Merge pull request #393 from adombeck/master
    • d9e5425 fix index out of range in InteractiveMultiselectPrinter
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Rich git-like string diff

    Rich git-like string diff

    Currently if you are comparing strings with testza, it only detects if they are different, but not what is different within them as it does with structs. When comparing multiline strings, it gets even more confusing as finding the issue on large strings requires using external tools.

    Here's an example of current behavior: image

    It would be great if it was possible to have a rich git-like diff on a string. There are even libraries that have specialized for this within Go: https://github.com/sergi/go-diff

    If this is a feature that would be accepted by the maintainers, I would be willing to implement it via PR.

  • Assertion output is hard to read in non-terminal outputs

    Assertion output is hard to read in non-terminal outputs

    I've just recently discovered this library and am finding it great. However, one issue I've got is that the output is really hard to read in VSCode instead of in a terminal.

    In VSCode it looks like this: image

    And the exact same in the terminal looks like this: image

    Cheers

  • build(deps): bump github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.2

    build(deps): bump github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.2

    Bumps github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.2.

    Release notes

    Sourced from github.com/klauspost/cpuid/v2's releases.

    v2.2.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/klauspost/cpuid/compare/v2.2.1...v2.2.2

    v2.2.1

    What's Changed

    Full Changelog: https://github.com/klauspost/cpuid/compare/v2.2.0...v2.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump github.com/pterm/pterm from 0.12.49 to 0.12.50

    build(deps): bump github.com/pterm/pterm from 0.12.49 to 0.12.50

    Bumps github.com/pterm/pterm from 0.12.49 to 0.12.50.

    Release notes

    Sourced from github.com/pterm/pterm's releases.

    v0.12.50

    What's Changed

    Fixes 🔧

    Other Changes

    New Contributors

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.49...v0.12.50

    Changelog

    Sourced from github.com/pterm/pterm's changelog.

    [Unreleased]

    Bug Fixes

    • revert original test & add new test
    • slice bounds out of range on select printer

    Commits
    • 45b7694 docs: autoupdate
    • 9784769 Merge pull request #420 from mponton/issue-419-out_of_range_select_printer
    • 2014856 Merge pull request #421 from pterm/dependabot/go_modules/github.com/MarvinJWe...
    • 7ff2267 chore(deps): bump github.com/MarvinJWendt/testza from 0.5.0 to 0.5.1
    • 8ff8b73 fix: revert original test & add new test
    • c91ee03 fix: slice bounds out of range on select printer
    • e996926 docs: autoupdate
    • d799127 Merge pull request #416 from pterm/dependabot/go_modules/golang.org/x/text-0.4.0
    • e6fb99d Merge pull request #407 from pterm/dependabot/go_modules/github.com/mattn/go-...
    • 877fe62 docs: autoupdate
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.1

    build(deps): bump github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.1

    Bumps github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.1.

    Release notes

    Sourced from github.com/klauspost/cpuid/v2's releases.

    v2.2.1

    What's Changed

    Full Changelog: https://github.com/klauspost/cpuid/compare/v2.2.0...v2.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump github.com/pterm/pterm from 0.12.51 to 0.12.53

    build(deps): bump github.com/pterm/pterm from 0.12.51 to 0.12.53

    Bumps github.com/pterm/pterm from 0.12.51 to 0.12.53.

    Release notes

    Sourced from github.com/pterm/pterm's releases.

    v0.12.53

    What's Changed

    Exciting New Features 🎉

    Fixes 🔧

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.52...v0.12.53

    v0.12.52

    What's Changed

    Exciting New Features 🎉

    Other Changes

    Full Changelog: https://github.com/pterm/pterm/compare/v0.12.51...v0.12.52

    Changelog

    Sourced from github.com/pterm/pterm's changelog.

    [Unreleased]

    Features

    • color: added color.ToStyle()
    • color: added color.ToStyle()
    • progressbar: added optional title to Start method

    Bug Fixes

    • prefix: fixed line numbers in different print functions

    [v0.12.52] - 2023-01-05

    Features

    • multiselect: added theme support for checkmarks
    • multiselect: added theme support for checkmarks

    Test

    • multiselect: fixed test

    Code Refactoring

    • progressbar: make add more safe

    Commits
    • 6d9dc8f docs: autoupdate
    • fb1d5fe Merge pull request #437 from pterm/303-some-line-numbers-are-wrong-when-using...
    • bb0f79e fix(prefix): fixed line numbers in different print functions
    • e392e89 docs: autoupdate
    • 4a64f8c Merge pull request #436 from pterm/351-make-progressbar-start-accept-a-title-...
    • beec9d1 feat(progressbar): added optional title to Start method
    • 07d6770 docs: autoupdate
    • 113497a Merge pull request #435 from pterm/350-add-tostyle-to-colors
    • 53a891d feat(color): added color.ToStyle()
    • 9b6f0f3 feat(color): added color.ToStyle()
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.3

    build(deps): bump github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.3

    Bumps github.com/klauspost/cpuid/v2 from 2.2.0 to 2.2.3.

    Release notes

    Sourced from github.com/klauspost/cpuid/v2's releases.

    v2.2.3

    What's Changed

    New Contributors

    Full Changelog: https://github.com/klauspost/cpuid/compare/v2.2.2...v2.2.3

    v2.2.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/klauspost/cpuid/compare/v2.2.1...v2.2.2

    v2.2.1

    What's Changed

    Full Changelog: https://github.com/klauspost/cpuid/compare/v2.2.0...v2.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Print status report after all tests ran

    Print status report after all tests ran

    We should print a status report after all tests ran. We have to figure out what we can display. Furthermore, we can definitely display the succeeded and failed assertions count, and the count of how many tests use testza.

A modern generic testing assertions library for Go

test test is a generics based testing assertions library for Go. There are two packages, test and must. test - assertions that mark the test for failu

Dec 12, 2022
HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽

gock Versatile HTTP mocking made easy in Go that works with any net/http based stdlib implementation. Heavily inspired by nock. There is also its Pyth

Jan 4, 2023
HTTP mocking to test API services for chaos scenarios
HTTP mocking to test API services for chaos scenarios

GAOS HTTP mocking to test API services for chaos scenarios Gaos, can create and provide custom mock restful services via using your fully-customizable

Nov 5, 2022
A toolkit with common assertions and mocks that plays nicely with the standard library

Testify - Thou Shalt Write Tests ℹ️ We are working on testify v2 and would love to hear what you'd like to see in it, have your say here: https://cutt

Dec 30, 2022
Go module to validate Apple app attestations and assertions.

AppAttest Since iOS 14, Apple offers a new way to attest the integrity of a device. This is based on the WebAuthn specification. This go module implem

Nov 22, 2022
Assert to perform programming assertions

Cli EN README Assert para realizar las aserciones de programación. GoDoc godoc for github Menú Principal Se configura un menú con ese ejemplo como dis

Jan 13, 2022
GoMock is a mocking framework for the Go programming language.

gomock GoMock is a mocking framework for the Go programming language. It integrates well with Go's built-in testing package, but can be used in other

Dec 28, 2022
A clipboard-based mocking framework for Go that gets out of your way.
A clipboard-based mocking framework for Go that gets out of your way.

A clipboard-based mocking framework for Go that gets out of your way. This tool has been built with inspiration lovingly taken from Moq, and fuelled b

Nov 18, 2022
Testy is a Go test running framework designed for Gametime's API testing needs.

template_library import "github.com/gametimesf/template_library" Overview Index Overview Package template_library is a template repository for buildin

Jun 21, 2022
A simple and expressive HTTP server mocking library for end-to-end tests in Go.

mockhttp A simple and expressive HTTP server mocking library for end-to-end tests in Go. Installation go get -d github.com/americanas-go/mockhttp Exa

Dec 19, 2021
Go Interface Mocking Tool

Charlatan Percolate's Go Interface Mocking Tool. Please read our introductory blog post. Installation go get github.com/percolate/charlatan Usage c

Nov 3, 2022
HTTP mocking for Golang

httpmock Easy mocking of http responses from external resources. Install Currently supports Go 1.7 - 1.15. v1 branch has to be used instead of master.

Jan 3, 2023
Lightweight HTTP mocking in Go (aka golang)

httpmock This library builds on Go's built-in httptest library, adding a more mockable interface that can be used easily with other mocking tools like

Dec 16, 2022
Interface mocking tool for go generate
Interface mocking tool for go generate

Interface mocking tool for go generate. What is Moq? Moq is a tool that generates a struct from any interface. The struct can be used in test code as

Jan 5, 2023
Flugel Test Documentation for steps to run and test the automatio
Flugel Test Documentation for steps to run and test the automatio

Flugel Test Documentation Documentation for steps to run and test the automation #Test-01 1 - Local Test Using Terratest (End To End) 1- By runing " t

Nov 13, 2022
This repository includes consumer driven contract test for provider, unit test and counter api.

This repository includes consumer driven contract test for provider, unit test and counter api.

Feb 1, 2022
siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.
siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

Dec 12, 2022
This testing tool surrounds go-ethereum with cannon to catch the blocks of retesteth going into go-ethereum and test cannon with them

Siege This testing tool surrounds go-ethereum with cannon to catch the blocks of retesteth going into go-ethereum and test cannon with them. Usage Sta

Mar 15, 2022
go-test-trace is like go test but it also generates distributed traces.
go-test-trace is like go test but it also generates distributed traces.

go-test-trace go-test-trace is like go test but it also generates distributed traces. Generated traces are exported in OTLP to a OpenTelemetry collect

Jan 5, 2023