Closed GoogleCodeExporter closed 8 years ago
Ok, I'm a little confused but I'll try it out.
A couple of comments:
1. Gallio will run tests by default in alphabetical order, not physical order.
This
is done to provide a somewhat better user experience since GUI test runners
often
show tests alphabetically.
(Note: A test framework can still force a non-deterministic order of execution
if it
wants.)
2. By default, all tests have an Order index of 0. You can change this in
MbUnit v3
by adding the Order property to the [Test] or [TestFixture]. eg.
[Test(Order=1)].
So actually Gallio runs tests (and fixtures) in order by increasing numeric
index
proceeding alphabetically for tests (and fixtures) with the same order index.
3. It is possible to declare explicit test dependencies using the [DependsOn]
attribute in MbUnit v3.
Original comment by jeff.br...@gmail.com
on 13 Nov 2008 at 6:37
Close this issue. Sorry. I installed the latest daily build, and now I can't
reproduce it. I will make a point of doing that FIRST next time.
Original comment by skime...@gmail.com
on 13 Nov 2008 at 6:40
Oh yes... and MbUnit v3 should NOT run SetUp or TearDown for Ignored tests.
However, [Ignore], [Explicit], and [Pending] tests, while skipped by default,
will
nevertheless run if explicitly selected by the user. This feature is intended
to
make it easier for a user to troubleshoot an ignored test without having to
make any
code changes first.
Original comment by jeff.br...@gmail.com
on 13 Nov 2008 at 6:41
Are you sure?
In any case, the R# runner uses the same code paths as the other runners to run
tests. The only difference is that it's possible that the set of "explicitly
selected" tests may differ. So for example, the ignored test might actually
have run
in between FirstTest and SecondTest. Consequently the setup and teardown would
also
have run, causing the SecondTest assumption to fail.
May I suggest that a better demo of dependent tests would be to open up and
write
some data to a file in one test then try to read it in another... A bit more
real-world.
Original comment by jeff.br...@gmail.com
on 13 Nov 2008 at 6:44
Thanks for the info. My class actually does that also through a base test
fixture. I
took that code out to make the example more simple and less code.
I was definitely getting different results, but darned if I can reproduce that
now.
In Gallio.Icarus, the tests show up in FirstTest/IgnoredTest/SecondTest order.
In
R#, they show up as IgnoredTest/FirstTest/SecondTest.
It looks like R# is putting all of the ignored tests first, then proceeding.
Original comment by skime...@gmail.com
on 13 Nov 2008 at 6:49
Bottom line, the new gallio code is doing what it is supposed to. I will
modify my
teaching tests to show that with the info you gave me. Thanks!
Original comment by skime...@gmail.com
on 13 Nov 2008 at 6:53
Unlikely that R# is running them in any different order.
However, it may be presenting them in a different order.
Order of presentation is not the same as order of execution.
Alright, I'm closing this issue. Please let me know if you have any other
questions
about this stuff. I recommend the gallio-dev or mbunit-dev mailing lists.
Original comment by jeff.br...@gmail.com
on 13 Nov 2008 at 7:19
Original issue reported on code.google.com by
skime...@gmail.com
on 13 Nov 2008 at 6:08