-
Notifications
You must be signed in to change notification settings - Fork 0
Ideas 2011:Unit tests
- we break stuff all the time and notice months later :)
- adding unit tests to our current code is really cumbersome and might be not worth it everywhere, but they should pay of at certain locations
Well, you can probably imagine our idea here ;-)
- Restructure the code to allow unit tests in the first place where you think it makes sense
- Write several tests as proof of concept, and try to make them maintainable
- The unit test system has to be really flexible - we frequently change the behavior of our code
- Usage of a unit testing frame work such as PyUnit or nose
- Good python skills
- Testing experience
- Difficulty: Hard, a big part of our code is very difficult to test, as it needs an almost entirely running game to work
- Areas: Testing, Refactoring
- Estimated difficulties: Finding a way to test without running most parts of UH
- Very few basic unit tests which can be used as a reference: directory
tests/
- A lot of code to refactor ;-)
- A list of the most urgent parts:
- Production code
- Collector code
- [PyUnit documentation] (http://docs.python.org/library/unittest.html)
- Summary of Unit Test Workflow:
- Write a module test suite.
- Write a class TestCase for each class in the module.
- Write a method TestCase for each method of each class. 4: Write method tests for each method TestCase.
- Tests can be grouped in the same test method. Do not be afraid to use inheritance to simplify things
As a pre-GSoC task you could work on this ticket: [#806] (http://trac.unknown-horizons.org/t/ticket/806).
You can shift around release goals and target dates in the planning stage as you like. Once your mentor and you agreed on a rough timetable, only light modifications should occur if there happens nothing unforeseeable.
- There are no milestones set so far. You might want to put thoughts into them and ask your mentor though!
- SoC Deadline: You implemented and documented standalone tests for a large part of our code. It needs to be maintainable by everybody in case you do not want to stay with UH.
In general: If your mentor agrees, you can change almost everything in our descriptions. They are just meant to provide guidance if you are not sure where to start or which way to choose.
You are especially free to alter the following parts:
- Integration testing?
- Speed testing/refactoring for speed
Your mentor for this task will probably be: totycro
These devs have experience with PyUnit: nihathrael, totycro
Home > GSoC > 2011 > [Ideas] (Ideas-2011)
Tile set
Combat system
AI player
Unit tests
GUI overhaul
FIFE
FIFE Sound
FIFE Pychan