Releases: ozontech/allure-go
pkg/allure Release v0.6.4
Release Notes
Features
- link, label and param is pointer now
- add Result.GetFirstLabel()
- add Result.GetLabels()
- Result.GetLabel removed
Release v0.6.17
Release Notes
- Add Setup test example
- readme.md update
pkg/framework
Features
- ⚡ Add ⚡
-
T.WitTestSetup(func(t provider.T))
-
T.WithTestTearDown(func (t provider.T))
Methods should be used for interactions with allure.Container
inside of the test.
Check readme for more.
T.Title
now consume(args ...interface{})
for using asfmt.Sprint
t.Description
now consume (args ...interface{}) for using asfmt.Sprint
- Add
T.Titlef(format string, args ...interface{})
for using asfmt.Sprintf
- Add
T.Descriptionf(format string, args ...interface{})
for using asfmt.Sprintf
pkg/framework Release v0.6.17
Release Notes
Features
- Add
t.WitTestSetup(func(t provider.T))
andt.WithTestTearDown(func (t provider.T))
for interactions withallure.Container
inside of the test. Check readme for more. t.Title
now consume(args ...interface{})
for using asfmt.Sprint
t.Description
now consume (args ...interface{}) for using asfmt.Sprint
- add
t.Titlef(format string, args ...interface{})
for using asfmt.Sprintf
- add
t.Descriptionf(format string, args ...interface{})
for using asfmt.Sprintf
Release v0.6.16
Release Notes:
Features
- add faker to dependencies (for examples)
- add table test example
- Readme updates
pkg/allure (v0.6.3)
Features
- Add
ToJSON() ([]byte, error)
method to theResult
object. It marshallResult
to the JSON and returns error if any. - Add
ToJSON() ([]byte, error)
method to theContainer
object. It marshallContainer
to the JSON and returns error if any. - Add
Done() error
method to the Container object. It works same asResult.Done
method. - Now
Result.Done()
returns error if any.
pkg/framework (v0.6.16)
Features
✨ Major:
Parametrized tests
Now you can run your parametrized tests in new way at GO
- ❓ How to use it?
- You need extend your suite struct with array of parameters. Its name MUST be like
ParamTestNameWithoutPrefix
.
i.e. if your test named likeTableTestCities
so param should have nameParamCities
- You need to create test method that will take your parameter as second argument after
provider.T
. Test name **
MUST** have prefixTableTest
instead of justTest
. i.e.TableTestCities
.
Simple example:
package suite_demo
import (
"testing"
"github.com/jackc/fake"
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
)
type ParametrizedSuite struct {
suite.Suite
// ParamCities param has name as expected test but has prefix Param instead of TableTest
ParamCities []string
}
func (s *ParametrizedSuite) BeforeAll(t provider.T) {
for i := 0; i < 10; i++ {
s.ParamCities = append(s.ParamCities, fake.City())
}
}
// TableTestCities is parametrized test has name prefix TableTest instead of Test
func (s *ParametrizedSuite) TableTestCities(t provider.T, city string) {
t.Parallel()
t.Require().NotEmpty(city)
}
func TestNewParametrizedDemo(t *testing.T) {
suite.RunSuite(t, new(ParametrizedSuite))
}
runner.RunTests
and suite.RunSuites
ouput:
Now runner.RunTests
and suite.RunSuites
returns interface SuiteResult. It contains all information about tests that you can use to customize your allure integrations
✨ Minor:
- reworked test collecting
- now errors in file creations will be logging as
t.Error
- provider.T.Run now returns
allure.Result
pointer
pkg/framework Release v0.6.16
Release notes
Features
✨ Major:
Parametrized tests
Now you can run your parametrized tests in new way at GO
- ❓ How to use it?
- You need extend your suite struct with array of parameters. Its name MUST be like
ParamTestNameWithoutPrefix
.
i.e. if your test named likeTableTestCities
so param should have nameParamCities
- You need to create test method that will take your parameter as second argument after
provider.T
. Test name **
MUST** have prefixTableTest
instead of justTest
. i.e.TableTestCities
.
Simple example:
package suite_demo
import (
"testing"
"github.com/jackc/fake"
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
)
type ParametrizedSuite struct {
suite.Suite
// ParamCities param has name as expected test but has prefix Param instead of TableTest
ParamCities []string
}
func (s *ParametrizedSuite) BeforeAll(t provider.T) {
for i := 0; i < 10; i++ {
s.ParamCities = append(s.ParamCities, fake.City())
}
}
// TableTestCities is parametrized test has name prefix TableTest instead of Test
func (s *ParametrizedSuite) TableTestCities(t provider.T, city string) {
t.Parallel()
t.Require().NotEmpty(city)
}
func TestNewParametrizedDemo(t *testing.T) {
suite.RunSuite(t, new(ParametrizedSuite))
}
runner.RunTests
and suite.RunSuites
ouput:
Now runner.RunTests
and suite.RunSuites
returns interface SuiteResult. It contains all information about tests that you can use to customize your allure integrations
✨ Minor:
- reworked test collecting
- now errors in file creations will be logging as
t.Error
- provider.T.Run now returns
allure.Result
pointer
pkg/allure Release v0.6.3
Release Notes
Features
- Add
ToJSON() ([]byte, error)
method to theResult
object. It marshallResult
to the JSON and returns error if any. - Add
ToJSON() ([]byte, error)
method to theContainer
object. It marshallContainer
to the JSON and returns error if any. - Add
Done() error
method to the Container object. It works same asResult.Done
method. - Now
Result.Done()
returns error if any.
Release v0.6.15
Release Notes v0.6.15
pkg/framework
Features
Add following asserts:
Exactly
Same
NotSame
EqualValues
NotEqualValues
EqualError
ErrorIs
ErrorAs
ElementsMatch
DirExists
Condition
Zero
NotZero
Add features:
-
LogStep(args ...interface{})
for provider.T and provider.StepCtx interfaces
Works ast.Log(args ...interface{})
, but also creates allure.Step at report -
LogfStep(format string, args ...interface{})
for provider.T and provider.StepCtx interfaces
Works ast.Logf(format string, args ...interface{})
but also creates allure.Step at report
Bugfixes
- Wrong parent suite setting for no-suite tests
- Duplicate test's name in FullName field at report
- Fixed error displaying while before hook fails
pkg/framework Release v0.6.15
Release Notes v0.6.15
Features
Add following asserts:
Exactly
Same
NotSame
EqualValues
NotEqualValues
EqualError
ErrorIs
ErrorAs
ElementsMatch
DirExists
Condition
Zero
NotZero
Add features:
-
LogStep(args ...interface{})
for provider.T and provider.StepCtx interfaces
Works ast.Log(args ...interface{})
, but also creates allure.Step at report -
LogfStep(format string, args ...interface{})
for provider.T and provider.StepCtx interfaces
Works ast.Logf(format string, args ...interface{})
but also creates allure.Step at report
Bugfixes
- Wrong paren suite setting for no-suite tests
- Duplicate test's name in FullName field at report
- Fixed error displaying while before hook fails
Release v0.6.14
Release Notes
pkg/allure
Features
- Add
Parameter
field (type[]allure.Parameter
) toallure.Result
object
pkg/framework
Features
- Add
T.WithParameters
method. It adds array ofallure.Parameter
to the test body - Add
T.WithNewParameters
method. It creates newAllure.Parameters
and attach them to the report body.
Release v0.6.14
Release Notes
Features
- Add
T.WithParameters
method. It adds array ofallure.Parameter
to the test body - Add
T.WithNewParameters
method. It creates newAllure.Parameters
and attach them to the report body.