EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Test framework? (https://www.eqemulator.org/forums/showthread.php?t=36593)

addingice 03-01-2013 09:27 PM

Test framework?
 
Now that I've kicked the hornet's nest over coding style guidelines, how about another punt?

Are we planning to use a specific testing framework (maybe the google test framework for example?) or just doing more ad hoc type testing?

KLS 03-02-2013 12:03 AM

Actually for shared memory stuff I used (and it's still there) cppunit. Not sure how much I like it, it seems a lot more verbose than JUnit.

Drajor 03-02-2013 08:47 PM

I assessed the code a few months ago to see how viable unit testing was. My findings were not positive. There is SQL and packet code nearly everywhere that I would like to add tests too and the amount of work to get around this appeared to be enormous. If someone can pull it off it would be awesome.

I worked at a games company once that had unit-like testing on game characters. Every night thousands of battles were tested, parsed and documented. My combat code which is written 'outside' the eqemu code is nearly at the point where I could try to set this up. But it all takes time ><

Tabasco 03-02-2013 09:25 PM

The less practical, but possibly more effective approach is to start a server and then attempt some content or feature of great ambition.
Players will notify you of every quirk and quibble and from there you can do direct debugging.

This is a joke, of course. I offer nothing of value but the quiet chuckle that may keep you from weeping in the face of this beautiful but occasionally broken behemoth of a codebase.

lerxst2112 03-02-2013 10:22 PM

Unit testing is tough to refit into an existing codebase, especially one with random encapsulation like this one.

One of the games I worked on we tried to add tests while also refactoring some of the huge classes into smaller testable components, but it was a very painful. In the end it did help quite a bit.

Most of the games I've worked on had some sort of automated testing that we ran overnight to find crashes and memory leak/fragmentation issues. It's a great tool if you can do it, but it would be tough without being able to modify both the server and client.

Drajor 03-02-2013 10:43 PM

Quote:

Originally Posted by Tabasco (Post 219134)
The less practical, but possibly more effective approach is to start a server and then attempt some content or feature of great ambition.
Players will notify you of every quirk and quibble and from there you can do direct debugging.

This is a joke, of course. I offer nothing of value but the quiet chuckle that may keep you from weeping in the face of this beautiful but occasionally broken behemoth of a codebase.

Aw I had a laugh. Now I just want to hug you and tell you everything is going to be ok.

Quote:

Originally Posted by lerxst2112
Unit testing is tough to refit into an existing codebase, especially one with random encapsulation like this one.

One of the games I worked on we tried to add tests while also refactoring some of the huge classes into smaller testable components, but it was a very painful. In the end it did help quite a bit.

Most of the games I've worked on had some sort of automated testing that we ran overnight to find crashes and memory leak/fragmentation issues. It's a great tool if you can do it, but it would be tough without being able to modify both the server and client.

We could try some static analysis too!

lerxst2112 03-02-2013 10:51 PM

Quote:

Originally Posted by Drajor (Post 219140)
We could try some static analysis too!

Running cppcheck found the huge memory leak (and some other less huge ones) from a while back. I considered running lint, but I'm old enough that I thought I might die before it finished. :)

Akkadius 03-02-2013 10:53 PM

Quote:

Originally Posted by lerxst2112 (Post 219141)
Running cppcheck found the huge memory leak (and some other less huge ones) from a while back. I considered running lint, but I'm old enough that I thought I might die before it finished. :)

LOL.

So optimistic.


All times are GMT -4. The time now is 06:51 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.