Skip to content

Provide information about the current test case in setUp() #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zoechi opened this issue May 7, 2015 · 4 comments
Open

Provide information about the current test case in setUp() #107

zoechi opened this issue May 7, 2015 · 4 comments
Labels
type-enhancement A request for a change that isn't a bug
Milestone

Comments

@zoechi
Copy link

zoechi commented May 7, 2015

When I have leftovers after running tests I want to know which test case wasn't cleaned up properly.
I start a docker container for each test in setUp() and if I knew the name of the current test I could assign the name of the current test to the container for later identification.

related to #48

@nex3 nex3 added type-enhancement A request for a change that isn't a bug status-blocked Blocked from making progress by another (referenced) issue labels May 7, 2015
@nex3 nex3 added this to the 1.0.0 milestone May 7, 2015
@hackst8r
Copy link

you can get the name of the currently running test with the following :

        import 'package:test/src/backend/invoker.dart'
                show
                Invoker
                ;
        ...                
        print (Invoker.current.liveTest.test.name) ;

@kevmoo
Copy link
Member

kevmoo commented Feb 22, 2016

@hackst8r true, but APIs in src are not guaranteed to be stable.

@grouma grouma removed the status-blocked Blocked from making progress by another (referenced) issue label Jun 15, 2018
@boukeversteegh
Copy link

This invoker is no longer available, it seems (dart 2.9)

@zoechi
Copy link
Author

zoechi commented Sep 12, 2020

@boukeversteegh you need to add the test_api package and import from there. It was moved there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants