Unit tests

Unit tests

Postby Smilex » 22 Sep 2012, 12:43

Because I need unit tests for the xml parsing code, I've decided to halt that until I get them set up.
The reason I post here if both because these forums are depressingly silent, but also because unit tests are essential for any program and fortunately easy to write. So all programmers who aren't up for the more advanced (for lack of a better word) stuff, should look into helping out with the unit tests.
What if a unit test? It's basically a program that is designed to only test one class or so.

I'll be using the Boost test framework, because Boost is pretty common among coders and is already in use with the project. Read more about it here http://www.boost.org/doc/libs/1_35_0/li ... index.html
Smilex
 
Posts: 8
Joined: 21 Sep 2012, 18:39

Re: Unit tests

Postby charlie » 22 Sep 2012, 16:13

Good to see some activity. I agree, Unit Tests used smartly are a great productivity tool.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2103
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Unit tests

Postby oln » 22 Sep 2012, 19:28

Yeah, unit tests are a good idea.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: Unit tests

Postby domtron » 15 Jun 2013, 02:14

Sorry if necroing this thread is bad.

Did any unit tests ever get made? I can't seem to find any in the code I have read. I would consider this a moderate, or possibly a high, priority task since it would facilitate better code and faster development time. Being new to c++ I'm not sure if I could put in place the initial unit test system, but I could create unit tests once I have a couple to use as a reference.
domtron
 
Posts: 96
Joined: 10 Jun 2013, 16:22

Re: Unit tests

Postby AlienWolf » 15 Jun 2013, 05:26

+1 for unit tests if they were ever looked at.

Is their a CI server or build server around somewhere which could do these daily tests? If so we could include it in the Makefile and get daily feedback on it.
I noticed svenskmand has a launchpad account with some builds on but I wasn't sure if these were automated, the latest build for ubuntu was weeks ago.
AlienWolf
 
Posts: 5
Joined: 14 Jun 2013, 06:39

Re: Unit tests

Postby oln » 15 Jun 2013, 09:11

This never got off the ground as smilex disappeared. But unit tests are good, so please go ahead and use them.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: Unit tests

Postby domtron » 15 Jun 2013, 17:43

I gess the first place to look for them would be in the xml branch where he said he was going to need them. I can try to implement unit tests but as I said before I'm not very confident in my ability to set them up from scratch.
domtron
 
Posts: 96
Joined: 10 Jun 2013, 16:22

Re: Unit tests

Postby nido » 27 Mar 2014, 21:29

Is there still genuine interest in creating unit tests? I would be happy to assist the interested parties in building up a framework in opendungeons for this purpose.
nido
 
Posts: 57
Joined: 07 Mar 2014, 00:47

Re: Unit tests

Postby oln » 02 Nov 2014, 12:05

Are people still supportive of adding unit tests? I was thinking of trying to do it, we are already using boost, so that's probably the easiest framework to use.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: Unit tests

Postby hwoarangmy » 02 Nov 2014, 14:24

IMHO, that's where console point is : to allow some kind of unit test.
But if you want to go for some real unit test, please go ahead, it's always good to have them especially to test non-regressions.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Unit tests

Postby Bertram » 02 Nov 2014, 22:30

Sure, this can't hurt. :)
User avatar
Bertram
VT Moderator
 
Posts: 1645
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: No registered users and 1 guest