Creating a Test Case

From FirebugWiki
Revision as of 14:54, 21 June 2011 by Sebastianz (Talk | contribs) (Page describing how to create test cases)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We can only work on issues, that we can reproduce. Therefore it is very important to have simple test cases for the bug you're seeing or the feature you are missing in Firebug. To help you with creating test cases we have created some HTML and JavaScript templates, which are listed below.

JavaScript template for automated tests - Template for automated tests used in FBTest

Manual tests

In order to create a simple manual test case you can use one of the templates below:

  1. Default HTML template - Common template used for normal purposes
  2. Enhanced HTML template - Template including two cases and some example elements

To adjust these templates please follow the steps below:

  1. Replace "xxxx" by number of your issue
  2. Replace "Issue summary" by title of your issue
  3. Put inspectable elements, form fields etc. into the "content" section
  4. Add the exact steps to reproduce your issue under "Steps to reproduce"
  5. Describe the currently seen result under "Observed result"
  6. Describe what you would expect to see under "Expected result"
  7. Add your contact information
  8. Remove all template comments

There are already some examples, which you can use as reference:

Automated tests

For creation of an automated test, which will be part of the FBTest suite you need at least two parts. An HTML file and a JavaScript file, which executes the test. To create the HTML page for the automated test case please follow the steps for the manual tests.

The JavaScript test can be created using the JavaScript template for automated tests. You will have to adjust this template using the automated test API.

There are also some examples for how to create automated tests.