I have written a web application that I would like to write tests for.
Originally, I wrote the application and the tests in parallel, but that fell apart under time pressures. The problem was, I had to prime the database up a certain way for the tests to work.
I have since reasoned that the proper approach is to stat with a clean system and build the test environment, then test against that. Finally, part of the test would be the removal of the files, projects and users creating during the test -- leaving the system as pristine as it started.
There are two features that will be tough to test in a 10-15 minute test:
- Users are created with temporary passwords, and they have to log on and reset the password
- Files are aged, and go from being new to being stale and then being automatically deleted over a period of four weeks.
The solution to the first problem is probably that I run a first test to create the users, then manually reset the passwords to known values, and finally run the rest of the tests. As far as checking that files are aged properly .. any suggestions?
As always, thanks for your feedback.
Update, re: consideration: I posted this to Meditations rather than SoPW because it was more of a metaphysical question than a 'How do I code this in Perl' -- but it doesn't matter to me where what section it lives in; I'm just happy to get the feedback from the monkish population. --Alex
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.