plainblack.com
Username Password
search
Bookmark and Share

    

WebGUI tests, project #1: Macros

User perlDreamer
Date 10/31/2009 3:06 pm
Views 762
Rating -1    Rate [
|
]
Previous · Next
User Message
perlDreamer

As I mentioned in a previous post, last week I was doing maintenance on the Macro tests, bringing them up to date with the latest and greatest in WebGUI testing technology.  While I was doing it, I found that Macro tests are basically in 4 categories.

  1. No test file at all.
  2. Just a test file which does a syntax check on the Macro module.
  3. Macro has some tests.
  4. Macro has 100% coverage.

As a first step, I'd like to eliminate category #1 which includes these 7 macros:

  • BackToSite.pm
  • ConvertUTCToTZ.pm
  • DeactivateAccount.pm
  • NewMail.pm
  • SpectreCheck.pm
  • StorageUrl.pm
  • Widget.pm

Macros are used by WebGUI users every day, so testing them completely is important. It's important enough to me that I'm willing to put out some karma to get them tested.

The amount of karma for each test will depend on the complexity of the macro tested and the quality of the tests (how much coverage, do the tests actually work, do the tests leak assets, version tags, users, groups, etc.)  I'm budgeting 2500 karma for tests for all 7 macros, so figure that each test is worth up to 350 karma.

Please post back to the thread if you're interested; it will also make sure that two people aren't working on the same module.  Also, please keep an eye on my blog where I'm going to have a series of posts on the latest and greatest in testing methods (courtesy of Graham).



Back to Top
Rate [
|
]
 
 
perlDreamer

I ran Devel::Cover on all the Macro tests, and can tell you which tests are in category 2 and 3:

Category 2 (syntax check only)

  • AdSpace
  • AOIHits
  • AOIRank
  • AssetProxy
  • Execute
  • RandomAssetProxy
  • RandomThread

Category 3 (not 100% covered)

  • a_account
  • AdminBar
  • AdminToggle
  • D_date
  • EditableToggle
  • FilePump
  • L_loginBox
  • LoginToggle
  • MiniCart
  • SQL.t
  • User.t
  • UsersOnline.t

There are 56 total macros, 34 of which have 100% test coverage.  The attached file lists all the Macros, along with their test status and coverage.



Attached Files
Back to Top
Rate [
|
]
 
 
bartjol

Well, I'm gonna have a go at the BackToSite macro (start easy :))

 

git repo here: http://github.com/BartJol/MacroTesting/



Back to Top
Rate [
|
]
 
 
bartjol

and it seems I'll also will make some tests for StorageUrl



Back to Top
Rate [
|
]
 
 
perlDreamer

I'm going to take the NewMail macro.



Back to Top
Rate [
|
]
 
 
perlDreamer

NewMail macro test is done, and added to the repo.



Back to Top
Rate [
|
]
 
 
lrobinson

I'm taking ConvertUTCToTz.pm .

Luke

 



Back to Top
Rate [
|
]
 
 
perlDreamer

I'm pleased to announce that Luke Robinson is the first person to actually get their tests merged into the core.

Way to go!  Karma will be sent shortly.



Back to Top
Rate [
|
]
 
 
perlDreamer

t/Macro/SQL.t now has 100% coverage.



Back to Top
Rate [
|
]
 
 
perlDreamer

Luke Robinson just finishshed the DeactivateAccount test, with 100% coverage.



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved