It is currently 08 Sep 2025, 11:16
   
Text Size

More comprehensive tests

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

More comprehensive tests

Postby BetaSteward » 23 Mar 2015, 19:00

I have also been playing with the idea of adding as many of the Examples in the Comprehensive Rules to the Test project. I'm a big fan of TDD and I believe that the more tests we have the better the quality of the product.

I would also like to encourage anyone doing development to add tests for each piece of non-trivial functionality that is added. Tests should ideally cover both positive and negative scenarios.

If you want to get really crazy you could write the tests first! Some people think that this helps you to work out the logic before you start writing the code.

Let me know what your thoughts/feelings/opinions are.

BetaSteward
BetaSteward
DEVELOPER
 
Posts: 129
Joined: 28 Mar 2010, 13:15
Has thanked: 6 times
Been thanked: 29 times

Re: More comprehensive tests

Postby LevelX » 23 Mar 2015, 21:45

I also like the tests and think it's a very effective way to improve and keep the quality of XMage.

The complete rule construction of MTG is complex and it's hard to have always the complete spectrum of dependencies in mind if you start to change something. I'm more than happy to be able to build the test project after a change to the XMage framework to see what is broken (after my change).
Without the tests I guess it's a lot harder to become aware of the things you broke with your changes. So the more tests we have the more we can see if a change is well done and needs some more fine tuning to be completely correct.

If I try to fix an existing bug I really often write first a test that indicates the bug because it's very useful for debugging and to check if the fix works. Also I know that this specific situation is in the future covered by a test.
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times


Return to Developers Talk

Who is online

Users browsing this forum: No registered users and 3 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 3 guests

Login Form