Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2013, 09:27 PM
addingice
Sarnak
 
Join Date: Jan 2013
Location: United States
Posts: 33
Default 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?
Reply With Quote
  #2  
Old 03-02-2013, 12:03 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

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.
Reply With Quote
  #3  
Old 03-02-2013, 08:47 PM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

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 ><
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote
  #4  
Old 03-02-2013, 09:25 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 270
Default

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.
__________________
http://dungeoncrawl.us.to
Reply With Quote
  #5  
Old 03-02-2013, 10:22 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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.
Reply With Quote
  #6  
Old 03-02-2013, 10:43 PM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Quote:
Originally Posted by Tabasco View Post
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!
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote
  #7  
Old 03-02-2013, 10:51 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Quote:
Originally Posted by Drajor View Post
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.
Reply With Quote
  #8  
Old 03-02-2013, 10:53 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by lerxst2112 View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:36 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3