Skip to content

Releases: ozontech/cute

v0.1.22

21 Oct 14:45
059c650
Compare
Choose a tag to compare

What's Changed

  1. New functionality Retry test

// RetryPolitic is a scope of methods to configure test repeat
type RetryPolitic interface {
	// Retry is a function for configure test repeat
	// if response.Code != Expect.Code or any of asserts are failed/broken than test will repeat counts with delay.
	// Default delay is 1 second.
	Retry(count int) MiddlewareRequest

	// RetryDelay set delay for test repeat.
	// if response.Code != Expect.Code or any of asserts are failed/broken than test will repeat counts with delay.
	// Default delay is 1 second.
	RetryDelay(timeout time.Duration) MiddlewareRequest
}

  1. Rename functions RequestRepeat to RequestRetry
  2. Fix broken tests

New Contributors

Full Changelog: v0.1.21...v0.1.22

v0.1.21

17 May 08:07
0205bc3
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.20...v0.1.21

v0.1.20

22 Apr 11:00
b0638c3
Compare
Choose a tag to compare

Refactored Request Repeat Politic Builder

New methods

	// RequestRepeatDelay set delay for request repeat.
	// if response.Code != Expect.Code, than request will repeat counts with delay.
	// Default delay is 1 second.
	RequestRepeatDelay(delay time.Duration) RequestHTTPBuilder

	// RequestRepeatPolitic is a politic for repeat request.
	// if response.Code != Expect.Code, than request will repeat counts with delay.
	// if Optional is true and request is failed, than test step allure will be skipped, and t.Fail() will not execute.
	// If Broken is true and request is failed, than test step allure will be broken, and t.Fail() will execute.
	RequestRepeatPolitic(politic *RequestRepeatPolitic) RequestHTTPBuilder

	// RequestRepeatOptional is a option politic for repeat request.
	// if Optional is true and request is failed, than test step allure will be skipped, and t.Fail() will not execute.
	RequestRepeatOptional(optional bool) RequestHTTPBuilder

	// RequestRepeatBroken is a broken politic for repeat request.
	// If Broken is true and request is failed, than test step allure will be broken, and t.Fail() will execute.
	RequestRepeatBroken(broken bool) RequestHTTPBuilder

What's Changed

Full Changelog: v0.1.19...v0.1.20

v0.1.19

30 Mar 23:02
9389b60
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.18...v0.1.19

What's Changed

New Contributors

Full Changelog: v0.1.18...v0.1.19

v0.1.18

26 Feb 16:42
43d0b43
Compare
Choose a tag to compare

What's Changed

  • fixed propagation of httpClient and jsonMarshaller for TableTests by @Apologiz in #66

New Contributors

Full Changelog: v0.1.17...v0.1.18

v0.1.17

12 Feb 11:22
9c6558e
Compare
Choose a tag to compare

New type of error:

BrokenError is an interface for set errors like Broken errors.
If the function returns an error, which implements this interface, the allure step will has a broken status

type BrokenError interface {
	IsBroken() bool
	SetBroken(bool)
	Error() string
}

New methods for errors:

// WrapOptionalError returns error with an Optional tag for Allure
func WrapOptionalError(err error) error 

// WrapBrokenError returns error with a Broken tag for Allure
func WrapBrokenError(err error) error 

// WrapRequireError returns error with flag for execute t.FailNow() and finish test after this error
func WrapRequireError(err error) error {

Add state in Result of test

Replacement for IsFailed() (deprecated)

	ResultStateSuccess
	ResultStateBroken
	ResultStateFail
func (r *testResults) GetResultState() ResultState 

What's Changed

Full Changelog: v0.1.16...v0.1.17

v0.1.16

05 Feb 12:34
97a43ec
Compare
Choose a tag to compare

What's Changed

Thank you a lot @KaymeKaydex @Bernigend

Full Changelog: v0.1.15...v0.1.16

v0.1.15

18 Jan 10:34
c94d785
Compare
Choose a tag to compare

Create new asserts for JSON

  • EqualJSON(expression string, expect []byte)
  • NotEqualJSON(expression string, expect []byte)

Thank you, @JeJutic!

v0.1.14

23 Nov 13:43
df2546e
Compare
Choose a tag to compare
  1. Fix empty body in logs and curls
  2. Refactoring methods
  3. Add docs for some private methods

v0.1.13 - hotfix

21 Nov 21:05
0c74c67
Compare
Choose a tag to compare
  1. Hot fix json asserts.
  2. Log request from response.