Litmus:Requirements: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
(66 intermediate revisions by 7 users not shown)
Line 1: Line 1:
'''[[Litmus|« back to Litmus main page]]'''
__TOC__
__TOC__
= Introduction =


== Purpose ==
= External Interface Requirements =
The purpose of this document is to capture in one place all the various requirements for the Litmus quality assurance (henceforth, QA) tool. In the past, many of the Netscape/Mozilla webtools have grown organically without much supporting documentation. While this document does not necessarily preclude this from happening with Litmus, it will at least give us an initial point of reference from which we can start design/development.


== Document conventions ==
== User interfaces ==
TBD.


== Intended audience ==
The primary human interface for the Litmus tools will be web-based: QA staff, developers, and testers will access the web interface to report manual test results, check automated test results, schedule testing requests, and report on past test runs.
This document is intended for QA staff, developers, build personnel, and sysadmins from the Mozilla Foundation, as well as community members interested in helping to improve the QA process for Mozilla products.


== Additional information ==
We want the Litmus web front-end to be easy to use and the user experience to be positive. This is a tool that we expect the Mozilla QA staff to be using every day. The QA staff has some experience with the limitations of Testrunner, and we will be mining that experience to avoid making the same mistakes again.
* [[Litmus Litmus Main Page]]
* [[Litmus:Test Result Format DTD|Test Result Format (DTD)]]
* [[TestcaseManagementIdeas|Test case management ideas]]


== Contact Info ==
In general, we want to design the web tool so that:
[http://developer-test.mozilla.org/en/docs/User:ChrisCooper Chris Cooper]
* the default display or report provides the most useful set of basic information for the user;
* common tasks are easily access from the default display;
* the path to more complicated tasks is easy discovered
* some degree of customization is possible, so that users are able to streamline their own experience.


== References ==
There will also be a command-line interface to the daemon/tools. This interface will be used by the automation processes for submitting results remotely via web services, but can also be used by testers to do the same.
* Le Vie, Jr., Donn. "Writing Software Requirements Specifications" <em>TECHWR-L</em> 7 July 2002. &lt;http://www.techwr-l.com/techwhirl/magazine/writing/softwarerequirementspecs.html&gt;.


= Overall Description =
We will want the remote APIs for the command-line interface to be fully documented (with examples) so it can be easily used by developers and QA staff.


== Perspective ==
If we do end up using a Spider browser extension to facilitate widespread automatic testing, we must provide the tester with some configurable options:
Mozilla testing resources, i.e. staff, are spread pretty thin. Even with some community support, the turnaround time for smoke testing and basic functional testing (BFT) for release candidates can take several days (the smoketests and BFTs are not currently automated). If regressions or new bugs are found during the testing process, the cycle can be even longer.  
* limit tests by group/type;
* disable extension completely.


An existing tool, [[Testrunner]], helps with the administration of this process, but the tool is somewhat limited. Testrunner has the concept of a "test run" as a single instance of testing, but these test runs must be manually cloned for each new testing cycle on a per-platform basis. Testrunner also does not let multiple users combine their efforts to work on a single test run; each user must have a separate test run, or have their results collated by a single "superuser."
== Hardware interfaces ==
At the recent Mozilla QA summit meeting (2005/06/21), it was decided to invest in a small cluster of machines that would serve as a test farm, similar in concept to the collection of machines that currently perform builds for [http://tinderbox.mozilla.org Tinderbox].


The individual tests that make up a test run are not stored anywhere in Testrunner. Instead, test lists must me be kept in sync with external test repositories manually. This has made it impossible for any kind of automation to be built into Testrunner.
The test farm will be made up of the following machines:
* Head Node (likely running Linux);
** Linux Boxes (2);
** Mac XServes (2);
** Windows Boxes (2).


There is also no way to do any meaningful querying or reporting on historical test results using Testrunner. On top of all this, Testrunner is tied intimately to specific versions of Bugzilla; small changes to Bugzilla can cause Testrunner to stop working.
== Software interfaces ==
Adding more machines won't do anything to aid the testing burden in and of itself. Indeed, in the short-term, it will simply add more system administration overhead.


Bob Clary has a XUL-based test harness, called Spider, which he has used to automate the testing of many Document Object Model (DOM) and Javascript (JS) engine tests, but there has never been a central repository for test results, so his results have been posted to [http://test.bclary.com/results/ his personal testing website].
This is where we hope to see the biggest payoff in terms of automation. A main Litmus daemon and web server will live on the head node. This daemon will be responsible for collating results as they come in. Depending on whether testing request scheduling proves feasible, the Litmus daemon will also be responsible for that scheduling.


Developers often would like to have testing done to verify a given change or patch. Historically, this has not often been possible due to the constant demands on the QA team.
The Spider test tool, or any other test tool we want to promote, should be packaged as a browser extension to facilitate widespread adoption.


Addressing these shortcomings in the current tools (or the lack of tools, in general) will do much to streamline the QA process for Mozilla. This should have  the desirable side effect of freeing up QA staff to work on more interesting things, e.g. harder edge-case testing, incoming bug verification and triage, community interaction, etc.
== Communication protocols and interfaces ==
Since Litmus is designed primarily as a web tool, the main protocol of record will be [http://www.w3.org/Protocols/ HTTP].


== Functions ==
The command-line interface will need to accept remote procedure calls in order to manage automation. Both [http://www.xmlrpc.com/ XML-RPC] and [http://www.w3.org/TR/soap/ SOAP] have been proposed for this.
The new QA tool, Litmus, is meant to address these problems by:


* serving as a repository for test cases, with all the inherent management abilities that implies;
= System Features =
* serving as a repository for test results, carrying over the best features of Testrunner, e.g. test lists, division of labor, etc.;
* providing a query interface for viewing, reporting on, and comparing test results;
* providing a request interface whereby developers can queue testing requests for patches, fixes, and regressions;
* managing the automation of testing requests &mdash; one-time, and recurring (e.g. from [http://tinderbox.mozilla.org/showbuilds.cgi tinderbox]) &mdash; on a new group of dedicated testing servers, managing request priorities appropriately;
* exposing an API to allow developers to work with the various tools easily outside of a graphical environment;
* making it easier for casual testers to assist with testing Mozilla products.


== User classes and characteristics ==
== Test Runs (was Replicate Testrunner functionality) ==
Litmus will attract the following types of users:
=== Testrunner history ===
* '''Sysadmins'''<br/>These power users will be responsible for the maintenance of the underlying machines, and will likely be doing so from the command line. They will be primarily interested in how easy Litmus is to setup and install, CPU/disk space/network usage/database usage by the Litmus daemon and web tool, and any security implications that Litmus exposes. 
Testrunner is a test run management system that works as an add-on over Bugzilla. More information can be found at [http://www.willowriver.net/products/testrunner.php Testrunner web site].
* '''Release Engineers'''<br/>
* '''QA Staff'''<br/>
* '''Core Mozilla Developers'''<br/>
* '''Mozilla Developers (including add-ons and extensions)'''<br/>
* '''Localizers'''<br/>
* '''Testers'''<br/>
* '''Community-at-large'''<br/>


== Operating environment ==
Note: Testrunner's concept of test case management is somewhat limited, which is why I have referred to it instead as 'test run management' above. Litmus will have a somewhat some holistic concept of test case management. See below.
The main Litmus daemon and web tool will reside on an as-of-yet unpurchased machine. This machine will likely be running Linux to facilitate remote administration. The daemon and web tool will need to be designed to use the existing [http://www.linuxvirtualserver.org/ Linux Virtual Server (LVS)] cluster.


== User environment ==
=== Description ===
Test runs are the primary means for us to focus community testing efforts.


To that end, Litmus admins can add special test runs (e.g. for testdays, releases, etc.). There will also be ongoing test runs for the common test groups that exist already.


== Design/implementation constraints ==
Test runs will replace the existing test groups as the top level of organization for running tests. This provides the extra (3rd) level of hierarchical organization that people have been asking for.


== Assumptions and dependencies ==
Since test runs are more focused, test run results can be more usefully used to report on testing progress. Special reports will be available automatically for each test run, and can be further customized using existing search functionality.


= External Interface Requirements =
There will also need to be a suite of administration tools to manage and maintain test runs, and all the various parts that make them up.


== User interfaces ==
In the future, we would also like to allow users to create their own custom test runs.


== Hardware interfaces ==
=== Priority ===
At the recent Mozilla QA summit meeting (2005/06/21), it was decided to invest in a small cluster of machines that would serve as a test farm, similar in concept to the collection of machines that currently perform builds for [http://tinderbox.mozilla.org Tinderbox].
Replacing Testrunner for use in test runs is now the #1 priority for Litmus.


The test farm will be made up of the following machines:
Once the core test run functionality is in place, we would also like to be able to allow regular users to create their own custom test runs. However, this is a secondary goal. We will design the basic test run system with this in mind, but it will not be implemented until the core test run behavior is in place.
* Head Node (likely running Linux);
** Linux Boxes (#?);
** Mac XServes (#?);
** Windows Boxes (#?).


== Software interfaces ==
=== Functional requirements ===
Adding more machines won't do anything to aid the testing burden in and of itself. Indeed, in the short-term, it will simply add more system administration overhead.
Basic Functionality:
* Run Tests interface
** Test runs will replace test groups in the current interface;
** Special test runs and test runs in progress will be highlighted and presented first;
** Continuous (ongoing) test runs for certain test groups will also be displayed, e.g. Smoketests, BFTs;
** overall progression of the interface (sys config->test run->subgroup->testcases) will remain the same


This is where we hope to see the biggest payoff in terms of automation. A main Litmus daemon will live on the head node. This daemon will be responsible for coordinating automated testing on the test farm machines, and collating results as they come in.
* Reporting
** The existing reporting tools will need to be made aware of test runs:
*** Users should be able to navigate the list of currently available test runs;
*** Admin should have the same functionality, but with the added ability to see/choose test runs that have been disabled or marked as out-of-date;
** information about specific test runs will include the following statistics:
*** coverage (percentages);
*** testcases remaining to be run, with a link to generate a special testlist of the outstanding testcases for running;
*** list of failures;
*** list of results with comments;
** All of the above will be properly interlinked so that more information about results and testcases can be found where appropriate.


== Communication protocols and interfaces ==
Admin Functionality:
* tools to add/clone/modify/disable/delete the various testing-related entities: products, platforms, operating systems, branches, and locales.
* add/clone/modify/disable/delete testcases;
* add/clone/modify/disable/delete subgroups;
* add/clone/modify/disable/delete test groups;
* add/clone/modify/disable/delete test runs;
* tools to create test runs from test groups, including the ability to change the scheduling of test runs;
* new searching tools to limit results by test runs;
* new reporting tools for test runs. This includes automated reports for testdays;


= System Features =
== Test Case Management ==


== Feature A ==
=== Description ===
Testrunner currently contains some metadata about test cases, and tracks results based on that metadata. However, Testrunner does not contain a copy (or even a link to) the test case itself. Updating test cases is a two-step procedure with no guarantee that both steps will be executed.


=== Description and priority ===
As much as possible, Litmus will act as a repository for test cases. This will allow for metadata to be associated directly with test cases. For external tests that cannot be brought into the repository, there will be sufficient information given to acquire the test case(s) from the remote source, e.g. download URL.


=== Action/result ===
=== Priority ===
Since there does not currently exist a central repository for test cases, this feature has the highest priority. If we can get a test case management interface up quickly, we can ensure that all testers are running the exact same set of tests, and implement automation from there.


=== Functional requirements ===
=== Functional requirements ===
Test case management requires the following:
* test case storage:
** for as many tests as possible, this will hopefully mean storing fully automated test cases in whatever syntax is appropriate for use with the Spider tool;
** links to externals test cases when they cannot be stored by the system, including access information;
** full instructions for running tests that cannot be automated. Note: this is similar to the existing test case functionality in Testrunner;
* version control for test cases, with trackable history and commentary;
* linking of test results to individual test cases with version information;
* ability to check out/download groups of test cases, based on test runs, or functionality group, or platform;
* full access control restrictions for the test case repository. Security-related test cases should only be visible/downloadable to those with sufficient privileges;
* web-based administration (there will be some overlap with the Testrunner functionality outlined above):
** add/modify/delete test cases;
** add/modify/delete test runs;
** add/modify/remove privileges for users;
** ability to view recent test case activity (additions/updates/deletions);
* ability to search for and display testcases based on:
** grouping (product/branch/etc.)
** ID
** text/regexp
** recent activity
** tag


== Feature B ==
== Web Services (was Automated Testing) ==
=== Description ===
We need to create a framework for submitting/receiving automated test results that can be used by the current QA test farm, but that can also accommodate receiving test results from other sources. We will implement a well-defined web services API to accommodate this.


= Other Nonfunctional Requirements =
=== Priority ===
This is a high-priority, and is next in line for implementation after the test run functionality.


== Performance requirements ==  
=== Functional requirements ===
Litmus web services will require:
* a well-defined reporting format, complete with a means to validate incoming results. [[Litmus:Web_Services|XML]] and [[Litmus:Test_Result_Format_DTD|DTD]] have been proposed for this;
* a processing script to accept and parse incoming results;
* an authentication component to ensure submissions come from trusted sources only;
* a method to avoid both report spam and genuine duplicate reports;
* logging of all submissions for auditing and debugging purposes.


== Safety requirements ==
== Reporting (Result Querying) ==
=== Description ===
Testing automation will generate an ongoing stream of test results. These results will be useless unless the proper tools are in place to query and compare them. This will address a current void in Testrunner, wherein there is no way to perform a head-to-head comparison between the results from two separate test runs. This makes it harder to spot regressions.


== Security requirements ==
We also have the opportunity as we move forward to begin collecting (and reporting on) performance and defect data. This will allow us to create meaningful trend data.


== Software quality attributes ==
=== Priority ===
Only some of the required reports are known at the time of writing. The various reports share a core set of functionality which can be put in place initially, and new or more complicated reports can be added over time.


== Project documentation ==
The test run comparison reports will likely be the first to be implemented.


== User documentation ==
=== Functional requirements ===
The reporting interface will require the following features:
* proper limiting for the number of results returned on a single page. This should also be configurable with some appropriate upper bound. The user should be able to navigate through result sets that span more that a single page;
* ability to limit results based on certain criteria;
* ability to sort/reverse results based on certain criteria;


= Other Requirements =
The following specific reports are needed:
* single test case: results from a single test case are marked-up for viewing;
* test run: test case results from a single test run are marked-up and presented in synopsis form;
* test case comparison: head-to-head comparison between two test case results, with differences highlighted;
* test run comparison: synopsis views for two test runs are compared head-to-head, with differences highlighted;


== Appendix A: Terminology/Glossary/Definitions list ==
== Automation Control (future) ==
=== Description ===
Some automated testing is already occuring using Bob Clary's Spider tool. Our goal with automated testing is two-fold:
# automate the automation: get the automated testing running continuously in an environment where it can be monitored, queried, and updated;
# automate as much regular testing as possible: this includes both smoketests and BFTs. Tests that cannot be run automatically should require as little interaction as possible, and this interaction must be standardized.
=== Priority ===
Automation control is not in the short-term critical path for Litmus.
=== Functional requirements ===
These requirements are out-of-date, but they represent our initial thinking and discussion on the subject of automation control in relation to Litmus. Spider is only one piece of a larger automation picture which now includes eggplant, [http://www.daveliebreich.com/blog/?p=53 jssh], and no doubt more in the future.


[[Category:QA]]
There are three facets here. The first are the test automation processes/daemons that will run on the individual testing machines in the test farm. The second is the Spider browser extension that will actually be running the tests. The final piece is t

Latest revision as of 21:04, 8 January 2008

« back to Litmus main page

External Interface Requirements

User interfaces

The primary human interface for the Litmus tools will be web-based: QA staff, developers, and testers will access the web interface to report manual test results, check automated test results, schedule testing requests, and report on past test runs.

We want the Litmus web front-end to be easy to use and the user experience to be positive. This is a tool that we expect the Mozilla QA staff to be using every day. The QA staff has some experience with the limitations of Testrunner, and we will be mining that experience to avoid making the same mistakes again.

In general, we want to design the web tool so that:

  • the default display or report provides the most useful set of basic information for the user;
  • common tasks are easily access from the default display;
  • the path to more complicated tasks is easy discovered
  • some degree of customization is possible, so that users are able to streamline their own experience.

There will also be a command-line interface to the daemon/tools. This interface will be used by the automation processes for submitting results remotely via web services, but can also be used by testers to do the same.

We will want the remote APIs for the command-line interface to be fully documented (with examples) so it can be easily used by developers and QA staff.

If we do end up using a Spider browser extension to facilitate widespread automatic testing, we must provide the tester with some configurable options:

  • limit tests by group/type;
  • disable extension completely.

Hardware interfaces

At the recent Mozilla QA summit meeting (2005/06/21), it was decided to invest in a small cluster of machines that would serve as a test farm, similar in concept to the collection of machines that currently perform builds for Tinderbox.

The test farm will be made up of the following machines:

  • Head Node (likely running Linux);
    • Linux Boxes (2);
    • Mac XServes (2);
    • Windows Boxes (2).

Software interfaces

Adding more machines won't do anything to aid the testing burden in and of itself. Indeed, in the short-term, it will simply add more system administration overhead.

This is where we hope to see the biggest payoff in terms of automation. A main Litmus daemon and web server will live on the head node. This daemon will be responsible for collating results as they come in. Depending on whether testing request scheduling proves feasible, the Litmus daemon will also be responsible for that scheduling.

The Spider test tool, or any other test tool we want to promote, should be packaged as a browser extension to facilitate widespread adoption.

Communication protocols and interfaces

Since Litmus is designed primarily as a web tool, the main protocol of record will be HTTP.

The command-line interface will need to accept remote procedure calls in order to manage automation. Both XML-RPC and SOAP have been proposed for this.

System Features

Test Runs (was Replicate Testrunner functionality)

Testrunner history

Testrunner is a test run management system that works as an add-on over Bugzilla. More information can be found at Testrunner web site.

Note: Testrunner's concept of test case management is somewhat limited, which is why I have referred to it instead as 'test run management' above. Litmus will have a somewhat some holistic concept of test case management. See below.

Description

Test runs are the primary means for us to focus community testing efforts.

To that end, Litmus admins can add special test runs (e.g. for testdays, releases, etc.). There will also be ongoing test runs for the common test groups that exist already.

Test runs will replace the existing test groups as the top level of organization for running tests. This provides the extra (3rd) level of hierarchical organization that people have been asking for.

Since test runs are more focused, test run results can be more usefully used to report on testing progress. Special reports will be available automatically for each test run, and can be further customized using existing search functionality.

There will also need to be a suite of administration tools to manage and maintain test runs, and all the various parts that make them up.

In the future, we would also like to allow users to create their own custom test runs.

Priority

Replacing Testrunner for use in test runs is now the #1 priority for Litmus.

Once the core test run functionality is in place, we would also like to be able to allow regular users to create their own custom test runs. However, this is a secondary goal. We will design the basic test run system with this in mind, but it will not be implemented until the core test run behavior is in place.

Functional requirements

Basic Functionality:

  • Run Tests interface
    • Test runs will replace test groups in the current interface;
    • Special test runs and test runs in progress will be highlighted and presented first;
    • Continuous (ongoing) test runs for certain test groups will also be displayed, e.g. Smoketests, BFTs;
    • overall progression of the interface (sys config->test run->subgroup->testcases) will remain the same
  • Reporting
    • The existing reporting tools will need to be made aware of test runs:
      • Users should be able to navigate the list of currently available test runs;
      • Admin should have the same functionality, but with the added ability to see/choose test runs that have been disabled or marked as out-of-date;
    • information about specific test runs will include the following statistics:
      • coverage (percentages);
      • testcases remaining to be run, with a link to generate a special testlist of the outstanding testcases for running;
      • list of failures;
      • list of results with comments;
    • All of the above will be properly interlinked so that more information about results and testcases can be found where appropriate.

Admin Functionality:

  • tools to add/clone/modify/disable/delete the various testing-related entities: products, platforms, operating systems, branches, and locales.
  • add/clone/modify/disable/delete testcases;
  • add/clone/modify/disable/delete subgroups;
  • add/clone/modify/disable/delete test groups;
  • add/clone/modify/disable/delete test runs;
  • tools to create test runs from test groups, including the ability to change the scheduling of test runs;
  • new searching tools to limit results by test runs;
  • new reporting tools for test runs. This includes automated reports for testdays;

Test Case Management

Description

Testrunner currently contains some metadata about test cases, and tracks results based on that metadata. However, Testrunner does not contain a copy (or even a link to) the test case itself. Updating test cases is a two-step procedure with no guarantee that both steps will be executed.

As much as possible, Litmus will act as a repository for test cases. This will allow for metadata to be associated directly with test cases. For external tests that cannot be brought into the repository, there will be sufficient information given to acquire the test case(s) from the remote source, e.g. download URL.

Priority

Since there does not currently exist a central repository for test cases, this feature has the highest priority. If we can get a test case management interface up quickly, we can ensure that all testers are running the exact same set of tests, and implement automation from there.

Functional requirements

Test case management requires the following:

  • test case storage:
    • for as many tests as possible, this will hopefully mean storing fully automated test cases in whatever syntax is appropriate for use with the Spider tool;
    • links to externals test cases when they cannot be stored by the system, including access information;
    • full instructions for running tests that cannot be automated. Note: this is similar to the existing test case functionality in Testrunner;
  • version control for test cases, with trackable history and commentary;
  • linking of test results to individual test cases with version information;
  • ability to check out/download groups of test cases, based on test runs, or functionality group, or platform;
  • full access control restrictions for the test case repository. Security-related test cases should only be visible/downloadable to those with sufficient privileges;
  • web-based administration (there will be some overlap with the Testrunner functionality outlined above):
    • add/modify/delete test cases;
    • add/modify/delete test runs;
    • add/modify/remove privileges for users;
    • ability to view recent test case activity (additions/updates/deletions);
  • ability to search for and display testcases based on:
    • grouping (product/branch/etc.)
    • ID
    • text/regexp
    • recent activity
    • tag

Web Services (was Automated Testing)

Description

We need to create a framework for submitting/receiving automated test results that can be used by the current QA test farm, but that can also accommodate receiving test results from other sources. We will implement a well-defined web services API to accommodate this.

Priority

This is a high-priority, and is next in line for implementation after the test run functionality.

Functional requirements

Litmus web services will require:

  • a well-defined reporting format, complete with a means to validate incoming results. XML and DTD have been proposed for this;
  • a processing script to accept and parse incoming results;
  • an authentication component to ensure submissions come from trusted sources only;
  • a method to avoid both report spam and genuine duplicate reports;
  • logging of all submissions for auditing and debugging purposes.

Reporting (Result Querying)

Description

Testing automation will generate an ongoing stream of test results. These results will be useless unless the proper tools are in place to query and compare them. This will address a current void in Testrunner, wherein there is no way to perform a head-to-head comparison between the results from two separate test runs. This makes it harder to spot regressions.

We also have the opportunity as we move forward to begin collecting (and reporting on) performance and defect data. This will allow us to create meaningful trend data.

Priority

Only some of the required reports are known at the time of writing. The various reports share a core set of functionality which can be put in place initially, and new or more complicated reports can be added over time.

The test run comparison reports will likely be the first to be implemented.

Functional requirements

The reporting interface will require the following features:

  • proper limiting for the number of results returned on a single page. This should also be configurable with some appropriate upper bound. The user should be able to navigate through result sets that span more that a single page;
  • ability to limit results based on certain criteria;
  • ability to sort/reverse results based on certain criteria;

The following specific reports are needed:

  • single test case: results from a single test case are marked-up for viewing;
  • test run: test case results from a single test run are marked-up and presented in synopsis form;
  • test case comparison: head-to-head comparison between two test case results, with differences highlighted;
  • test run comparison: synopsis views for two test runs are compared head-to-head, with differences highlighted;

Automation Control (future)

Description

Some automated testing is already occuring using Bob Clary's Spider tool. Our goal with automated testing is two-fold:

  1. automate the automation: get the automated testing running continuously in an environment where it can be monitored, queried, and updated;
  2. automate as much regular testing as possible: this includes both smoketests and BFTs. Tests that cannot be run automatically should require as little interaction as possible, and this interaction must be standardized.

Priority

Automation control is not in the short-term critical path for Litmus.

Functional requirements

These requirements are out-of-date, but they represent our initial thinking and discussion on the subject of automation control in relation to Litmus. Spider is only one piece of a larger automation picture which now includes eggplant, jssh, and no doubt more in the future.

There are three facets here. The first are the test automation processes/daemons that will run on the individual testing machines in the test farm. The second is the Spider browser extension that will actually be running the tests. The final piece is t