wiki:BluePrint/Testing

Version 22 (modified by somayjain, 11 years ago) ( diff )

--

Blueprint: QA (General Ideas)

We have a Testing process in current use.
This page is for looking at potential improvements.

Behaviour-Driven Development takes Test-Driven Development further to focus on the Specification rather than the Verification using something like pyspec or PyFITto provide testable specs:

There are a huge number of Testing Tools available to cover the various parts of the Testing process:

A community available for assistance:

Testing procedure regarding checking in code and merging:

  • After a merge, run all tests.
  • If the tests don't pass, don't commit the merge.

In other words, all tests must pass before pushing to a stable branch. This does not stop buggy code without tests getting into a branch, so a possible future enhancement might be to ensure all new code gets tested, e.g. by ensuring 100% coverage.

There may be a script added to automate this.


Testing that Users/ customers should be doing:

Acceptance or 'Customer' tests

These are the highest level tests that check that the right thing has been built. These can often be manual tests, but automating them early on helps avoid wasted effort and disappointment by highlighting things the customer does not need. It may be enough to let the customer test the system for a few days to ensure satisfaction.


Testing that Developers should be doing:

Unit Tests (must do)

"Building the Code Right"
The current implementation of Unit Tests use python's unittest.
It's details can be found here - Unit Tests

Continuous Integration

Whenever a commit is made it should be checked to see that it doesn't break anything

Note: As of January 2012, BZR/Launchpad info for eden is deprecated. Please visit the GitHub page. Thanks.

Alternate options which could be investigated:

Regression Testing

Fired by dev after certain number of changes or whenever they like.

Documentation

As well as writing DocStrings in all functions, we can generate an overall API using:

If writing a separate manual then we can use:


Testing that Testers should be doing as part of Acceptance:

Boundary Testing (should do)

Building the Right Code

Checks functionality of modules against specs

This sees the application as a black box & so the same tests could be run here against both the Python & PHP versions, for instance.

Sahana is a Web-based application, so testing should be from browser perspective:

Functional tests can be written using Selenium:

A new alternative that we should look at is Windmill.

Alternate opions which could be investigated:

Integration Testing (good thing)

We depend on various 3rd-party components so we need to ensure that as these components are upgraded this doesn't break any of our functionality:

  • Web2Py
    • CherryPy
    • SimpleJSON
  • T2
  • OpenLayers
  • jQuery
  • Ext

Usability Tests

Accessibility

  • Are we XHTML 1.0 compliant?
  • Are we usable without JavaScript?

Performance Tests

Whilst the Web2Py framework is fast, we should check that we're not doing anything stupid to slow it down:

Load Tests

How many simultaneous users can the system support?

Stress Tests

If extreme load is applied to the application, does it recover gracefully?

  • Tools above but using more extreme parameters

Security Tests

Whilst the Web2Py framework is secure by design, we should validate this:

Things developers can do to reduce risks:

Smoke Tests

The current implementation can be found here - SmokeTests
"Smoke tests" provide a way to highlight the worse failures, and cover a large part of the system. Basically these are like a generic 'can I view this page?' acceptance test. The idea is to write a small script that discovers all the views in the system, and make requests to them, highlighting exceptions. These tests can run quickly as they do not require a round-trip HTTP request. When exceptions occur, these can be turned into regression tests.

Test Coverage

coverage is a python command/module that allows easy measurement of test coverage over a python program. You can generate summary reports or pretty HTML reports of the code coverage. http://nedbatchelder.com/code/coverage/

BluePrints

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.