End of all tests

38 views
Skip to first unread message

Nortier David

unread,
Jun 26, 2020, 5:43:55 AM6/26/20
to seleniu...@googlegroups.com

Hello

 

I want to send a email only when all the tests are ended to play : « where/when » can I to code this ?

 

Thanks

 

 

  David

 

 


====== DISCLAIMER ======

http://www.cph.be/maildisclaimer

Josh Abrahamsen

unread,
Jun 26, 2020, 7:14:47 AM6/26/20
to seleniu...@googlegroups.com
Depends on which test framework you're using. In Nunit add it to OneTimeTearDown. I think in TestNG it's @AfterAll for same concept.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d71eae1815b0463a90ca40bcdd7c68a7%40cph.be.

Nortier David

unread,
Jun 26, 2020, 7:20:26 AM6/26/20
to seleniu...@googlegroups.com

In Nunit indeed

 

Thanks

 

 

But OneTimeTearDown ocurs for each test : I want only for the last test.

 

 

 

De : seleniu...@googlegroups.com <seleniu...@googlegroups.com> De la part de Josh Abrahamsen
Envoyé : vendredi 26 juin 2020 13:14
À : seleniu...@googlegroups.com
Objet : Re: [selenium-users] End of all tests

Josh Abrahamsen

unread,
Jun 26, 2020, 8:00:27 AM6/26/20
to seleniu...@googlegroups.com
It won't if you create a separate class for the OneTimeTearDown there with a SetupFixture.

Nortier David

unread,
Jun 26, 2020, 8:22:25 AM6/26/20
to seleniu...@googlegroups.com

Great !

 

Thank you

 

De : seleniu...@googlegroups.com <seleniu...@googlegroups.com> De la part de Josh Abrahamsen
Envoyé : vendredi 26 juin 2020 14:00

Nortier David

unread,
Jun 26, 2020, 9:18:43 AM6/26/20
to seleniu...@googlegroups.com

I’ve reply to quickly

 

OneTimeSetUp & OneTimeTearDown are played for each test …

 

 

De : seleniu...@googlegroups.com <seleniu...@googlegroups.com> De la part de Josh Abrahamsen
Envoyé : vendredi 26 juin 2020 14:00

Joe Ward

unread,
Jun 26, 2020, 9:33:55 AM6/26/20
to seleniu...@googlegroups.com
I could give a note, you ask very broad questions and don't provide a lot of context to help people give you answers. A lot of what you're trying to solve would be much more easily done if you were as detailed as possible in explaining what your environment is. 

That being said, OneTimeSetup etc. are run for all the tests in a fixture. Therefore, you'd need to import the tests you want to run into the fixture you're setting the reporter up in.

I'm also sure there are plenty more answers that are probably more specific to you that will answer your question. Again, though, we'd need to hear more information on your environment in order to give answers that will be of more use to you. 

Nortier David

unread,
Jun 26, 2020, 9:37:31 AM6/26/20
to seleniu...@googlegroups.com

It’s ok

 

Mistake about the namespace (it must be the same)

 

Sory

 

De : seleniu...@googlegroups.com <seleniu...@googlegroups.com> De la part de Joe Ward
Envoyé : vendredi 26 juin 2020 15:33

Josh Abrahamsen

unread,
Jun 26, 2020, 11:12:26 AM6/26/20
to seleniu...@googlegroups.com
The test classes should not inherit the class that has the SetupFixture.

Nortier David

unread,
Jul 3, 2020, 9:38:18 AM7/3/20
to seleniu...@googlegroups.com

Hello

 

Who knows the equivalent of OneTimeSetUp in Xunit ?

 

(in windows c#)

 

 

Tks

 

David

 

 

De : seleniu...@googlegroups.com <seleniu...@googlegroups.com> De la part de Josh Abrahamsen
Envoyé : vendredi 26 juin 2020 17:12

Reply all
Reply to author
Forward
0 new messages