Project:Storm
Version:6.x-1.x-dev
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

It seems accepted across Drupal modules now that tests are a good way of spotting if bugs are introduced into a module, or if a module breaks a different part of Drupal.

Therefore it would be useful to have a few tests written for Storm.

Lets use this issue to suggest and discuss tests that may be useful - and new particular issues for posting each test and the associated tracking of committing them to Storm.

Comments

#1

Seems to me we should start with the basics.

1.) Creation of each node type which is generally to say make sure all the form rendering happens correctly
2.) Tests that attempt to create nodes without required fields, making sure it's not allowed
3.) Creation of nodes without correct dependencies (ie try and create a time tracking without appyling it to a project/task/ticket, create a team without there being any people saved in Storm, etc..)
4.) Try and pass bad variables into functions (ie pass strings into # of days you have for billing)

Then move into testing the same things with different admin settings, ie create an invoice tax settings set to "do not apply" and make sure it is created, etc...)

Of course that could make for a lot of issues, if we do one issue per test.

#2

Yes - a lot of issues, but the best thing will be that Storm ships with the tests attached. So individual issues will come and go as they are committed to CVS.

#3

On the CiviCRM project we spent time making sure it was easy to reset the databases so you knew each time what values you were starting with and you always had clean data. I'm thinking I 'll start be creating that logic.

So create a class with methods that does the following

  1. Truncates the tables for all active storm modules
  2. Populate active module tables new with sample data, being sure to create any dependencies (so if a project is created an organization is automatically created for the project to be linked to)
  3. The methods allow for the creation of multiple records (eg you can create multiple people so you can test assigning multiple people to a team)
  4. Allow for the default values to be overridden easily in the respective method calls from #2. So if a method automatically set a field to 0 you can easily overwrite the value for that field with 1.

It should be that difficult really, I don't have much of experience with DBTNG, but that's a hurdle for early next year :)

#4

Bumping up this issue.

With the automated testing now available for contrib projects, it'd be a really good opportunity to put some tests into Storm.

#5

Title:Discussion of tests for Storm» Tests for Storm

I've just committed the first (very simple) test for the Storm Organization module, and have also requested that Stom be part of the beta tests of contrib automated testing so that all patches for Storm are tested.

Hopefully this will be a big advance for the stability as Storm evolves.

There is a really big opportunity here - please can people submit patches that extend this test and/or new tests so that we can get automated testing into Storm!

#6

Status:active» fixed

Each new test can use its own issue.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here