| Page 1 of 1 | [ 5 posts ] |
|
According to the documentation, the tearDown and setUp are supposed to be executed before/after each test, but it's only happening for me once.
Anyone else have this issue? |
Juan Ignacio DopazoYUI Contributor
|
I think the documentation is wrong and that setUp and tearDown are supposed to be run once for each Case.
|
|
Hi Juan,
Hmm. So there are two places to implement tearDown and setUp. One is at the Y.Test.Case level so that the tearDown/setUp will run for each test in the Test.Case. These tearDown and setUp methods are running as expected. The other is at the Y.Test.Suite level so that the tearDown/setUp is supposed to run for each Y.Test.Case. This is not the behavior I'm getting. The tearDown/setUp methods are only run once for the suite regardless of the number of Test.Cases that the suite has. |
|
The Suite should only run it's setUp and tearDown methods per Suite run, not each test case. The TestCase ones should run per case.
|
|
Hi Dav
Thanks for the clarification. It's not intuitive for me that the tearDown and setUp is only called once for the entire suite when the tearDown/setUp is called for each test in the TestCase. Well... maybe inconsistent is the word I'm looking for. So if I wanted to have a setUp/tearDown for each Test.Case, then what would be the best way to accomplish this? Listen to the destroy events for each Test.Case? Thanks. |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group