Difference between revisions of "Bugzilla::Keyword Unit Tests"

From CDOT Wiki
Jump to: navigation, search
(Unit Test Cases)
(How to Run)
 
(11 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
Bugzilla::Keyword - A Keyword that can be added to a bug.
 
Bugzilla::Keyword - A Keyword that can be added to a bug.
 +
 +
Unit test for Bugzilla::Keyword based on Test::More framework. Included several object mockups
  
 
== Unit Test Cases ==
 
== Unit Test Cases ==
 
1. keyword_count() returns 0 when DB is empty
 
1. keyword_count() returns 0 when DB is empty
 +
 
2. keyword can be created
 
2. keyword can be created
 +
 
3. bug_count() returns correct value
 
3. bug_count() returns correct value
 +
 
4. get_all_with_bug_count() returns correct list of keywords
 
4. get_all_with_bug_count() returns correct list of keywords
 +
 
5. Duplicate keyword cannot be created
 
5. Duplicate keyword cannot be created
 +
 +
6. keyword_count() returns 1
  
 
==  Schedule Scoping ==
 
==  Schedule Scoping ==
Line 21: Line 29:
 
Relevant Bugs:
 
Relevant Bugs:
  
None
+
[https://bugzilla.mozilla.org/show_bug.cgi?id=412083 Bugzilla Unit Tests Using Test::More]
  
 
API Documentation:
 
API Documentation:
Line 30: Line 38:
  
 
[http://geosoft.no/development/unittesting.html Unit Tests Guidelines]
 
[http://geosoft.no/development/unittesting.html Unit Tests Guidelines]
 +
 
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing (Wikipedia)]
 
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing (Wikipedia)]
  
 +
== How to Install ==
 +
 +
Copy Keyword.t and Mockups.pm (both are attached to [https://bugzilla.mozilla.org/show_bug.cgi?id=412083 Bugzilla Unit Tests Using Test::More bug]) to t/unit directory
  
== How to Install ==
+
== How to Run ==
  
 +
Run Keyword.t
  
  
== How to Run ==
+
[[Image:keyword_t.gif]]

Latest revision as of 04:57, 18 October 2008

Bugzilla::Keyword Unit Tests


Overview

Bugzilla::Keyword - A Keyword that can be added to a bug.

Unit test for Bugzilla::Keyword based on Test::More framework. Included several object mockups

Unit Test Cases

1. keyword_count() returns 0 when DB is empty

2. keyword can be created

3. bug_count() returns correct value

4. get_all_with_bug_count() returns correct list of keywords

5. Duplicate keyword cannot be created

6. keyword_count() returns 1

Schedule Scoping

Will be finished within two days

References

Relevant Bugs:

Bugzilla Unit Tests Using Test::More

API Documentation:

Bugzilla::Keyword API

Unit Testing Documentation:

Unit Tests Guidelines

Unit Testing (Wikipedia)

How to Install

Copy Keyword.t and Mockups.pm (both are attached to Bugzilla Unit Tests Using Test::More bug) to t/unit directory

How to Run

Run Keyword.t


Keyword t.gif