ozontech / allure-go Goto Github PK
View Code? Open in Web Editor NEWComplete Allure provider in Go which doesn't overload the interface usage
Home Page: https://t.me/allure_go_chat
License: Apache License 2.0
Complete Allure provider in Go which doesn't overload the interface usage
Home Page: https://t.me/allure_go_chat
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
Some tests needs to bypass data between BeforeEach and Test case method.
For example we start appliction on random port in BeforeEach test case and we need that port
in test case to connect application.
Describe the solution you'd like
Common patter to pass data in go is context.Context.
Describe alternatives you've considered
Alternatively we could make getter to test parameters and pass data in it
There are few documentation mistakes in this example for the suite configuration:
package suite_demo
import (
"testing"
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/runner"
"github.com/ozontech/allure-go/pkg/framework/suite"
)
type DemoSuite struct {
suite.Suite
}
func (s *DemoSuite) TestSkip(t provider.T) {
t.Epic("Demo")
t.Feature("Suites")
t.Title("My first test")
t.Description(`
This test will be attached to the suite DemoSuite`)
}
func TestSkipDemo(t *testing.T) {
t.Parallel()
runner.RunSuite(t, new(SkipDemoSuite))
}
Seems the TestSkipDemo
function should be like that:
func TestSkipDemo(t *testing.T) {
t.Parallel()
suite.RunSuite(t, new(DemoSuite))
}
new(DemoSuite)
instead of the new(SkipDemoSuite)
cause the SkipDemoSuite
struc doesn't exist in the example.suite.RunSuite
instead of the runner.RunSuite
cause no any RunSuite
method for the runner
Just a picture with the current code example:
Describe the bug
Run test fails with error message like:
Failed marshal Result: json: error calling MarshalJSON for type json.RawMessage: invalid character 'c' after top-level value
Failed marshal Result: json: error calling MarshalJSON for type json.RawMessage: invalid character 'i' after top-level value
To Reproduce
Error appears in github.com/ozontech/allure-go/pkg/[email protected]/container.go
func printContainer()
go.mod
github.com/ozontech/allure-go/pkg/framework v0.6.26
github.com/ozontech/allure-go/pkg/allure v0.6.10
go.sum
github.com/ozontech/allure-go/pkg/allure v0.6.10 h1:chHzORobuPf3UJz23c2n3PIy6QaoxnLgaei2pwBiVxY=
github.com/ozontech/allure-go/pkg/allure v0.6.10/go.mod h1:4oEG2yq+DGOzJS/ZjPc87C/mx3tAnlYpYonk77Ru/vQ=
github.com/ozontech/allure-go/pkg/framework v0.6.26 h1:sHOBTQG5LFQhLFeaAi1zAI9fCSc/L0AbCweO+fgaNOQ=
github.com/ozontech/allure-go/pkg/framework v0.6.26/go.mod h1:iMUFp2UHRFtEGiVajXGVGavlSurfrSfYe9fmutgbvmI=
Expected behavior
Test runs without fails
Issue: map[string]bool don't provide enough information for the advanced library integrations like cute
From @siller174 PR:
Describe the bug
If during the initialization of the suite you add a step with a check that will fall, the entire suite in the allure report is simply ignored. The information in the console is displayed correctly
To Reproduce
import (
"testing"
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
)
type BeforeAfterDemoSuite struct {
suite.Suite
}
func (s *BeforeAfterDemoSuite) BeforeAll(t provider.T) {
t.WithNewStep("Before suite Step", func(sCtx provider.StepCtx) {
sCtx.Require().Equal(1, 2, "lol")
})
}
func (s *BeforeAfterDemoSuite) TestBeforeAfterTest(t provider.T) {
t.Epic("Demo")
t.Feature("BeforeAfter")
t.Title("Test wrapped with SetUp & TearDown")
t.Description(`
This test wrapped with SetUp and TearDown containert.`)
t.Tags("BeforeAfter")
}
func TestBeforesAfters(t *testing.T) {
t.Parallel()
suite.RunSuite(t, new(BeforeAfterDemoSuite))
}
Expected behavior
Display the suite in the report, with an error in the setup and a skipped body of tests.
Describe the bug
Parametrized tests duplicating suite name in FullName
Добрый день
Сегодня попробовал использовать ваш проект для написания unit тестов, в результате проб возник следующий вопрос: если я в тесте делаю Step (через WithNewStep) и в переданной функции тест фейлится (require не проходит), то в allure отчете все равно данный шаг помечается как успешный. Пример кода, и отчета прилагаю:
type SomeSuite struct {
suite.Suite
}
func (s *SomeSuite) TestSome(t provider.T) {
t.WithNewStep("Step 1", func(sCtx provider.StepCtx) {
require.Equal(t, 2, 2)
})
t.WithNewStep("Шаг 2", func(sCtx provider.StepCtx) {
require.Equal(t, 2, 3)
})
t.WithNewStep("Шаг 3", func(sCtx provider.StepCtx) {
require.Equal(t, 2, 2)
})
}
func TestSkipDemo(t *testing.T) {
suite.RunSuite(t, new(SomeSuite))
}
Аналогично если делать t.Step.
133a9d3f-db0d-11ec-9001-bce92f7d8cfc-result.zip
Подскажите, это ожидаемое поведение, или же нет?
Is your feature request related to a problem? Please describe.
Ability to run tests with specific run configuration in GoLand ( as discussed in #48 )
Describe the solution you'd like
New run configuration provided by plugin for GoLand
Добрый день,
Настраиваем у себя тестопс в связке с go и gitlab, столкнулись с такой проблемой что не работает фильтрация тестов при запуске.
Наш пайплайн:
stages:
- test
variables:
ALLURE_LAUNCH_NAME: "${CI_PROJECT_NAME} - ${CI_COMMIT_SHORT_SHA}"
ALLURE_LAUNCH_TAGS: "regular, ${CI_COMMIT_REF_NAME}"
ALLURE_TESTPLAN_PATH: "./testplan.json"
ALLURE_RESULTS: "allure-results"
test:
image: golang:latest
stage: test
before_script:
- wget https://github.com/allure-framework/allurectl/releases/latest/download/allurectl_linux_386 -O /usr/bin/allurectl
- chmod +x /usr/bin/allurectl
- allurectl job-run start
- allurectl job-run plan --output-file ${ALLURE_TESTPLAN_PATH}
script:
- mkdir -p allure-results
- allurectl watch --results ${ALLURE_RESULTS} -- go test -v
after_script:
- pkill allurectl
При запуске пайплайна есть строки:
$ allurectl job-run plan --output-file ${ALLURE_TESTPLAN_PATH}
Save test plan for [7] to file [/builds/test-framework-allure-testops/testplan.json]
Save test plan for [7] to file [/builds/test-framework-allure-testops/tests/acl]
Running command: go [test -v]
Из этого сделал вывод что интеграция настроена корректно и проблема непосредственно в allurectl job-run plan --output-file ${ALLURE_TESTPLAN_PATH} что подтвердил Артем Ерошенко
Просьба взять на доработку
Describe the bug
verifying github.com/ozontech/allure-go/pkg/[email protected]: checksum mismatch
downloaded: h1:FVHaO6tkZl1RulL35HZ+M9NlkCtlKpVOR1TSgdEokF4=
go.sum: h1:gSqCHeysGi2+05aeYf02JouLroAB4fQhVkwLTtq1yCY=
SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.
To fix:
rm go.sum
go clean -modcache
go mod tidy
Describe the bug
Using the new parameterised tests mechanism I'm unable to create a TempDir() if I use relatively long parameter values. The error reported is file name too long
To Reproduce
package example
import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"testing"
)
type TestParams struct {
arg1 string
arg2 string
arg3 string
arg4 string
arg5 string
arg6 string
}
type ParametrizedSuite struct {
suite.Suite
ParamLongParams []TestParams
}
func (s *ParametrizedSuite) BeforeAll(t provider.T) {
s.ParamLongParams = []TestParams{
{
arg1: "I am a long string used as arg1",
arg2: "I am a long string used as arg2",
arg3: "I am a long string used as arg3",
arg4: "I am a long string used as arg4",
arg5: "I am a long string used as arg5",
arg6: "I am a long string used as arg6",
},
}
}
func (s *ParametrizedSuite) TableTestLongParams(t provider.T, params TestParams) {
t.Parallel()
t.TempDir()
t.Require().NotEmpty(params)
}
func TestNewParametrizedDemo(t *testing.T) {
suite.RunSuite(t, new(ParametrizedSuite))
}
Expected behavior
The test name is truncated to create a temp directory.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
output:
/usr/local/go/bin/go tool test2json -t /private/var/folders/_0/4m7k4wy15ygb4wwsj4jbfyc00000gp/T/dlvLauncher2.sh /Users/jaspal.puri/Library/Application Support/JetBrains/Toolbox/apps/Goland/ch-0/223.8214.59/GoLand.app/Contents/plugins/go-plugin/lib/dlv/mac/dlv --listen=127.0.0.1:57440 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /private/var/folders/_0/4m7k4wy15ygb4wwsj4jbfyc00000gp/T/GoLand/___1TestNewParametrizedDemo_in_github_dns_ad_zopa_com_zopaUK_devx_system_tests_system_tests.test -- -test.v -test.paniconexit0 -test.run ^\QTestNewParametrizedDemo\E$
=== RUN TestNewParametrizedDemo
=== RUN TestNewParametrizedDemo/ParametrizedSuite
=== RUN TestNewParametrizedDemo/ParametrizedSuite/BeforeAll
=== RUN TestNewParametrizedDemo/ParametrizedSuite/Tests
=== RUN TestNewParametrizedDemo/ParametrizedSuite/Tests/LongParams_{arg1:I_am_a_long_string_used_as_arg1_arg2:I_am_a_long_string_used_as_arg2_arg3:I_am_a_long_string_used_as_arg3_arg4:I_am_a_long_string_used_as_arg4_arg5:I_am_a_long_string_used_as_arg5_arg6:I_am_a_long_string_used_as_arg6}
=== PAUSE TestNewParametrizedDemo/ParametrizedSuite/Tests/LongParams_{arg1:I_am_a_long_string_used_as_arg1_arg2:I_am_a_long_string_used_as_arg2_arg3:I_am_a_long_string_used_as_arg3_arg4:I_am_a_long_string_used_as_arg4_arg5:I_am_a_long_string_used_as_arg5_arg6:I_am_a_long_string_used_as_arg6}
=== CONT TestNewParametrizedDemo/ParametrizedSuite/Tests/LongParams_{arg1:I_am_a_long_string_used_as_arg1_arg2:I_am_a_long_string_used_as_arg2_arg3:I_am_a_long_string_used_as_arg3_arg4:I_am_a_long_string_used_as_arg4_arg5:I_am_a_long_string_used_as_arg5_arg6:I_am_a_long_string_used_as_arg6}
test_example_test.go:37: TempDir: mkdir /var/folders/_0/4m7k4wy15ygb4wwsj4jbfyc00000gp/T/TestNewParametrizedDemoParametrizedSuiteTestsLongParams_{arg1I_am_a_long_string_used_as_arg1_arg2I_am_a_long_string_used_as_arg2_arg3I_am_a_long_string_used_as_arg3_arg4I_am_a_long_string_used_as_arg4_arg5I_am_a_long_string_used_as_arg5_arg6I_am_a_long_string_used_as_arg6}51418563: file name too long
--- FAIL: TestNewParametrizedDemo (0.00s)
--- FAIL: TestNewParametrizedDemo/ParametrizedSuite (0.00s)
--- PASS: TestNewParametrizedDemo/ParametrizedSuite/BeforeAll (0.00s)
--- FAIL: TestNewParametrizedDemo/ParametrizedSuite/Tests (0.00s)
--- FAIL: TestNewParametrizedDemo/ParametrizedSuite/Tests/LongParams_{arg1:I_am_a_long_string_used_as_arg1_arg2:I_am_a_long_string_used_as_arg2_arg3:I_am_a_long_string_used_as_arg3_arg4:I_am_a_long_string_used_as_arg4_arg5:I_am_a_long_string_used_as_arg5_arg6:I_am_a_long_string_used_as_arg6} (0.00s)
FAIL
Debugger finished with the exit code 0```
Возможно, стоит подсветить обязательность defer перед Teardown и обьяснить почему он нужен, чтобы легче было раскурить этот нюанс без сторонней помощи
require add stage field to allure.Result structure
Is your feature request related to a problem? Please describe.
Добавить аннотацию для сокрытия чувствительных данных для вложений и отчетов. Под чувствительными данным понимаются пароли, токены, SSL сертификаты и т.д,
Describe the solution you'd like
В задаче allure-framework/allure2#392 была реализована такая возможность в allure-framework. Параметр принимает третий необязательный параметр со скртыми и Исключенными опциями: mode: "hidden" | "masked" - masked скрывает значение параметра, что бы защитить чувствительные данные, и hidden полностью скрывает параметр из отчета
Describe alternatives you've considered
https://www.npmjs.com/package/allure-playwright#parameters-usage
Additional context
В результате должно появиться 2 теста в https://github.com/ozontech/allure-go/blob/master/examples/suite_demo/parameters_test.go
If test fails in WithTestSetup function test won't be failed
please add ElementsMatch as a assert
Describe the bug
TestResults in pkg/framework/runner/tests.go shoudl be protected with mutex to save write in parralel tests
To Reproduce
If we start async example
(https://github.com/ozontech/allure-go/blob/master/examples/async/async_suite_test.go)
with data race flags
go test -v -race -parallel 10
We could see data race error in test results write
Expected behavior
No data race error
Describe the bug
WithNewAsyncStep in WithNewAsyncStep will cause deadlock and tests will never finish.
WithNewAsyncStep in step won't be executed async
To Reproduce
package my_suite
import (
"github.com/ozontech/allure-go/pkg/framework/provider"
)
func (s *Suite) TestSome3(t provider.T) {
t.Parallel()
t.WithNewStep("sync-step1", func(sCtx provider.StepCtx) {
sCtx.WithNewAsyncStep("sync-step1-async-step-1", func(sCtx provider.StepCtx) {
sCtx.WithNewAsyncStep("sync-step1-async-step-1-step1", func(sCtx provider.StepCtx) {
})
})
})
}
package my_suite
import (
"time"
"github.com/ozontech/allure-go/pkg/framework/provider"
)
func (s *Suite) TestSome3(t provider.T) {
t.Parallel()
startedAt := time.Now()
timeSinceStart := func() int64 {
return int64(time.Since(startedAt).Round(time.Second).Seconds())
}
sleepDuration := 5 * time.Second
t.WithNewStep("sync-step1", func(sCtx provider.StepCtx) {
sCtx.Logf("sync-step1. start: %d", timeSinceStart())
time.Sleep(sleepDuration)
sCtx.Logf("sync-step1. finish: %d", timeSinceStart())
sCtx.WithNewAsyncStep("sync-step1-async-step-1", func(sCtx provider.StepCtx) {
sCtx.Logf("sync-step1-async-step-1. start: %d", timeSinceStart())
time.Sleep(sleepDuration)
sCtx.Logf("sync-step1-async-step-1. finish: %d", timeSinceStart())
})
sCtx.WithNewAsyncStep("sync-step1-async-step-2", func(sCtx provider.StepCtx) {
sCtx.Logf("sync-step1-async-step-2. start: %d", timeSinceStart())
time.Sleep(sleepDuration)
sCtx.Logf("sync-step1-async-step-2. finish: %d", timeSinceStart())
})
})
t.WithNewStep("sync-step2", func(sCtx provider.StepCtx) {
sCtx.Logf("sync-step2. start: %d", timeSinceStart())
time.Sleep(sleepDuration)
sCtx.Logf("sync-step2. finish: %d", timeSinceStart())
})
}
output
step_context.go:104: sync-step1. finish: 5
step_context.go:104: sync-step1-async-step-1. start: 5
step_context.go:104: sync-step1-async-step-1. finish: 10
step_context.go:104: sync-step1-async-step-2. start: 10
step_context.go:104: sync-step1-async-step-2. finish: 15
step_context.go:104: sync-step2. start: 15
step_context.go:104: sync-step2. finish: 20
Expected behavior
add support of testing.TB
type TB interface {
Cleanup(func())
Error(args ...any)
Errorf(format string, args ...any)
Fail()
FailNow()
Failed() bool
Fatal(args ...any)
Fatalf(format string, args ...any)
Helper()
Log(args ...any)
Logf(format string, args ...any)
Name() string
Setenv(key, value string)
Skip(args ...any)
SkipNow()
Skipf(format string, args ...any)
Skipped() bool
TempDir() string
}
Is your feature request related to a problem? Please describe.
Now days all test setup steps logged in test steps block
Describe the solution you'd like
I want something like WithTestSetup
method in provider.T interface for logging into preconditions block
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
main.go:25: test started
Actual behavior
step_context.go:108: test started
If suite contains AfterEach() method a paniced test not marked as FAILED and all suite considered as ok.
Use panictest.zip to reproduce the bug.
(uncomment AfterEach() declaration in panictest_test.go to reproduce the bug).
Originally posted by StasGrishaevTutu January 17, 2023
Привет ! Во-первых, спасибо за проделанную работу, инструмент отличный)
Есть один момент который не даёт покоя, с начала моменты работы с allure-go - это быстрый запуск тестов по клику в GoLand, а именно по зелёнкой иконке play слева :
те, при использования фреймворка и при условии что тесты наследуются от allureSuite.Suite - запускать можно только целиком сьют, не каждый тест или кейс по отдельности.
скажите, я что то упускаю, как то можно запускать в один клик тесты/кейсы и с использованием allure-go ?
Describe the bug
I am running a test in Suite in gitlab. I had an error in test's step with message "index out of range [0]. Allure was logging an error in the afterEach step instead of an error inside test. Moreover, the element I accessed has len = 1, so this shouldn't be an error.
To Reproduce
Steps to reproduce the behavior:
afterEach panicked: runtime error: index out of range [0] with length 0 goroutine 509 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x65 github.com/ozontech/allure-go/pkg/framework/runner.(*runner).RunTests.func1.3.1.2() /builds/Nx2CE54f/0/bx/pdp-api/.cache/go/pkg/mod/github.com/ozontech/allure-go/pkg/[email protected]/runner/runner.go:182 +0x85 panic({0x14edf00, 0xc000dbee28}) /usr/local/go/src/runtime/panic.go:884 +0x212 gitlab.*.ru/bx/pdp-api/e2e/internal/steps.(*Helper).GetDigitalBookLitres.func1() /builds/Nx2CE54f/0/bx/pdp-api/e2e/internal/steps/item.go:111 +0x2a5 gitlab.*.ru/marketplace/qa/tools/qa_pack/pkg/utilities.Poll(0x18956c0?, 0xc0004ab6b0?, 0xc000d39198) /builds/Nx2CE54f/0/bx/pdp-api/.cache/go/pkg/mod/gitlab.*.ru/marketplace/qa/tools/[email protected]/pkg/utilities/utilities.go:123 +0xfb gitlab.*.ru/bx/pdp-api/e2e/internal/steps.(*Helper).GetDigitalBookLitres(0xc00040abd0, {0x18956c0, 0xc0004ab6b0}, {0x18acc20, 0xc0000ef7a0}) /builds/Nx2CE54f/0/bx/pdp-api/e2e/internal/steps/item.go:107 +0x176 gitlab.*.ru/bx/pdp-api/e2e/suites.(*WebSmokeSuite).TestWebAddToCartV8wDigitalBook(0xc000072780, {0x18acc20, 0xc0000ef7a0}) /builds/Nx2CE54f/0/bx/pdp-api/e2e/suites/web_suite.go:176 +0x130 reflect.Value.call({0xc000216a20?, 0xc000131830?, 0x30?}, {0x16067f1, 0x4}, {0xc0005a3920, 0x2, 0x18?}) /usr/local/go/src/reflect/value.go:584 +0x8c5 reflect.Value.Call({0xc000216a20?, 0xc000131830?, 0x10?}, {0xc0005a3920?, 0x10?, 0x2561240?}) /usr/local/go/src/reflect/value.go:368 +0xbc github.com/ozontech/allure-go/pkg/framework/runner.(*testMethod).GetBody.func1({0x18acc20?, 0xc0000ef7a0?}) /builds/Nx2CE54f/0/bx/pdp-api/.cache/go/pkg/mod/github.com/ozontech/allure-go/pkg/[email protected]/runner/tests.go:150 +0x2b1 github.com/ozontech/allure-go/pkg/framework/runner.(*runner).RunTests.func1.3.1(0xc000ba9ba0) /builds/Nx2CE54f/0/bx/pdp-api/.cache/go/pkg/mod/github.com/ozontech/allure-go/pkg/[email protected]/runner/runner.go:205 +0x2e7 testing.tRunner(0xc000ba9ba0, 0xc000b8e190) /usr/local/go/src/testing/testing.go:1446 +0x10b created by testing.(*T).Run /usr/local/go/src/testing/testing.go:1493 +0x35f
Expected behavior
If test falls, allure logs error inside test
Describe the bug
In allure report every step of the test has execution time, and if we sum every step time, it will not be equal to duration
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Summ of the execution time of steps is equal to duration
Additional context
As you can see duration != summ of the time of steps
Describe the bug
Test fails in panic when user tries to run it in runner.Run function
Если запускать несколько параметризированных тестов с одинаковыми параметрами, у них дублируются названия и из-за этого запускается только первый параметризированый тест.
after v0.6.16 release suite container creation was broken.
So Before/After all steps didn't created at file system
Describe the bug
(Probably related to #4)
A single test with a broken
step results in a passed
test.
The test
func Test_AllureExample(t *testing.T) {
runner.Run(t, "Allure demo", func(t provider.T) {
t.WithNewStep("First step", func(sCtx provider.StepCtx) {
sCtx.Logf("Demo break")
sCtx.Broken()
})
})
}
The report (exluding labels):
{
"name": "Allure demo",
"fullName": "Test_AllureExample/Allure_demo",
"status": "passed",
"statusDetails": {
"message": "",
"trace": ""
},
"start": 1669278069758,
"stop": 1669278069758,
"uuid": "f34c46a8-6bd0-11ed-bd95-a45e60d5053f",
"historyId": "baa17e747dc3baf09c0ad0b7a00c6251",
"testCaseId": "3948cbd85816212b9f92d81b0b03b207",
"labels": [
],
"steps": [
{
"name": "First step",
"status": "broken",
"start": 1669278069758,
"stop": 1669278069758
}
]
}
Note that step has a proper broken
status, but the test has a passed
status.
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
broken()
in this step's function.Expected behavior
The test is marked as Broken
in the report.
Additional context
I have some questions regarding this issue:
Broken
status to a test?provider.T
of my test after setting some step to broken()
? There is no BreakNow()
fn, so i just have to end the test execution naturally after a broken step?Broken
by the library?Describe the bug
Incorrect example with defer. Require my stops test execution when a test result fails, and defer stack will not fill.
To Reproduce
Steps to reproduce the behavior:
look through example:
https://github.com/ozontech/allure-go/blob/master/examples/suite_demo/setup_test.go#L92
Expected behavior
defer should executed right after context declaration
Support Helper()
in StepCtx
Add t.Helper() to Error()
and ErrorF
Test: bla_test.go
func TestName(t *testing.T) {
runner.Run(t, "Single test with allure-go Runner", func(t provider.T) {
t.Epic("Compare with allure-go")
t.Description("New Test Description")
t.WithNewStep("Step description", func(ctx provider.StepCtx) {
ctx.Errorf("Error message")
})
})
}
func TestName1(t *testing.T) {
runner.Run(t, "Single test with allure-go Runner", func(t provider.T) {
t.Errorf("Error message")
})
}
Logs without helper:
=== RUN TestName
=== RUN TestName/Single_test_with_allure-go_Runner
common.go:125: Error message
--- FAIL: TestName (0.00s)
--- FAIL: TestName/Single_test_with_allure-go_Runner (0.00s)
=== RUN TestName1
=== RUN TestName1/Single_test_with_allure-go_Runner
common.go:125: Error message
--- FAIL: TestName1 (0.00s)
--- FAIL: TestName1/Single_test_with_allure-go_Runner (0.00s)
Log with helper:
=== RUN TestName
=== RUN TestName/Single_test_with_allure-go_Runner
bla_test.go:22: Error message <--- trace from test
--- FAIL: TestName (0.00s)
--- FAIL: TestName/Single_test_with_allure-go_Runner (0.00s)
=== RUN TestName1
=== RUN TestName1/Single_test_with_allure-go_Runner
bla_test.go:22: Error message <--- trace from test
--- FAIL: TestName1 (0.00s)
--- FAIL: TestName1/Single_test_with_allure-go_Runner (0.00s)
FAIL
Map .xlsx allure attachments to "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" content type.
Describe the bug
Set up/Tear down sections are not displayed in tests without suite
To Reproduce
Steps to reproduce the behavior:
1-2. Write simple test with t.WithTestSetup()/t.WithTestTeardown()
func TestSetupTeardown1(t *testing.T) {
runner.Run(t, "My 1 test", func(t provider.T) {
t.WithTestSetup(func(t provider.T) {
t.WithNewStep("My 1 Step!", func(sCtx provider.StepCtx) {
time.Sleep(1 * time.Second)
})
})
t.WithNewStep("My 2 Step!", func(sCtx provider.StepCtx) {
time.Sleep(1 * time.Second)
})
t.WithTestTeardown(func(t provider.T) {
t.WithNewStep("My 3 Step!", func(sCtx provider.StepCtx) {
time.Sleep(1 * time.Second)
})
})
})
}
Expected behavior
t.WithTestSetup()/t.WithTestTeardown() sections are displayed in allure-report as in the tests with suites
При использовании фичи TableTest такие автотесты в отчете помечаются отдельным, не родительским сьютом.
Воспроизведение:
Ожидаемое поведение:
Оба автотеста живут в одном Suite
Фактическое поведение:
Параметризированный тест живет в отдельном Suite (по названию автотеста)
На скриншоте видно что автотест TableTestCRMCreateHireObject не попал в SmokeSuite, а создал новый Suite по названию теста
stretchr/testify/assert has assert.InDelta() function, and I use it in my tests. But allure-go hasn't such one. It would be nice to have.
Describe the bug
After running go test ./...
, expected allure-results
folder is not generated even both $ALLURE_OUTPUT_PATH and $ALLURE_OUTPUT_FOLDER are set up correctly. It works fine on my Macbook laptop.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
See above description.
Is your feature request related to a problem? Please describe.
Add functions to logging with automatic step creation. It will reduce amount of calls for test describing
Describe the solution you'd like
func TestSome(t provider.T) {
t.LogStep("Step1")
t.LogfStep("%s, %s", "arg1", "arg2")
t.WithNewStep("Step3", func(sCtx provider.StepCtx) {
sCtx.LogStep("Step3.1")
sCtx.LogfStep("Step3.2: %s, %s", "arg1", "arg2")
})
}
I was able to generate the allure results and allure report locally. I am trying to run this command:
allure generate allure-results --clean -o allure-report
and i getting the below error:
$ allure generate allure-results --clean -o allure-report
/scripts-975-835204/step_script: line 181: allure: command not found
Is there an golang version of allure-commandline ?
Adding new asserts:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.