Suggestions for Performing Regression Testing?
gmletzkojr asks: "The company that I am currently working at develops a fairly complex industrial controller, complete with embedded software, a GUI on the controller, and a Windows app to connect over Ethernet. On previous versions of a similar project, we have performed testing manually - ie, monkey presses button, and sees that light turns on, widget turns, GUI updates, etc. However, this is extremely time consuming (previous complete regression testing took ~3 weeks) and is error prone in itself. How do you perform complete system regression testing? Do you use shrink-wrapped packages, or build your own? How do you test features that are easy for humans to observe, but not as easy for software to detect (ie, the light came on, the GUI updated when I pressed the external input, etc)?"
and their name starts with an M. Microsoft maybe? I don't remember. NDAs have a way for making me forget details.
Anyway, doing regression testing is a 2 edged sword.
1. You have to program more stuff into your program to allow for automation. Now, because you're adding another feature to the entire program, that means more testing to ensure that the added functionality actually works. Lastly, you have to hire/write regression scripts. How much time does it take to write scripts? How long will they be useful for? If it takes ~the same time/money to write scripts as to hire/be the monkey...How much is that worth?
2. It can be a big convenience if you can justify #1.
Grump
Is it true that more people vote for the winner of American Idol, than vote for the president? -Ali G.
I work at a company with a 30+ year mainframe application that runs exclusively via line mode commands. This software is wrapped by SOAP middleware that I largely wrote or migrated our old legacy binary middleware to. This SOAP middleware is called by Tomcat - our choice of Java Servlet Container serving up dynamic web / transactional content. The application is extremely complex and results of almost any command/query change on a minute-by-minute basis - based on approx 1GB of fresh weather and other data updated asynchronously with over 20 data feeds from worldwide reporting stations.
How do we test this you ask?
Break down the problem into:
(a) components
(b) component integrations (i.e. network/middleware checks)
Automate tests for each and you're at least 80/90% of the way there. I.e. Unit test pieces such as a UI or Middleware, and also make unit tests that verify the connections between components.
If you're unlucky enough to be in a totally mixed-up environment without any seperation between GUI, logic, back-end, etc... often lumped together as MVC, but I prefer just to say "component based" you may have to do some re-architecture to get to a better scriptable setup.
Our automated tests (web environment, mind you) test for:
1. Basic web server & Tomcat / Servlet function.
2. Web/Tomcat Server -> Middleware connection (no actual request)
3. Tomcat->Middleware->Legacy System connection.
4. Tomcat->Middleware->Legacy System operations - i.e. actually do something.
Given the complex and ever changing data we operate with, we can't test everything that only a human eyeball can spot. However, these tests are re-used for live system monitoring, regression testing, and load testing. They also can find many of the "brain dead" issues - such as a total system meltdown or specific function being broken by a code change without requiring a tester to test everything out.
I strongly recommend going for automated testing as much as possible - even if you're only getting at the low hanging fruit. Breaking down the problem into managable chunks w/unit tests can also save serious hassle trying to figure out later why a tester got an error somewhere.
A few years ago, MS had a testing aid called
- creatively enough (for MS, at least...)
Microsoft Test.
As you didn't even get it with MSDN Universal
I never got the chance to evaluate or use it,
but perhaps there is a counterpart in OSS...?
I'd love to find one... TIA
Mercury has a decent suite:
They have Quality Center:
Which will help you write manual test scripts and create new test cases and do defect tracking.
Quick Test Pro:
Semi decent intergration into quality center so you write your test cases, then bust it out to code. You CAN just simply record a test and run it, but the lifetime of your script may vary. You need to build in tons of logic just to ensure the script can handle what it thrown at it and handle various error conditions.
Caveats:
If you like open source, this is not for you.
If you don't like vbscript, you may find a difficult path to using other languages. There are options, but if you have a large automation team, a common language is useful. Vbscipt is sometimes the common denominator.
If you ARE familiar with Load Runner or their performance tools, you'll love it.
Even if you don't mind vbscript you may find their tool unweildy in the way it picks up objects.
All in all, probably the BEST commercial offering - simply because a monkey can use it. There are good ones in opensource if you can code, i.e. "Push To Test" if you like java.
ps: sorry there are no links, I would just google them anyway
ymmv
I just hope that you're mounting a scratch monkey during testing.
Can you cleanly separate the internals of the system from the external interfaces? That way, interaction with the internals can be scripted without having to watch GUIs or blinking lights. You do have to test the part that drives the GUI/etc., but that is presumably easier than having to do all the system tests through it.
I've seen it tried with a stopwatch... You are feeling sleepy... you are feeling sleepy...
Looks like the free AutoIt would help.
Also see AutoIt Script home page.
Why does anyone call it regression testing? What is regressing? What is retrograding? Is your application regressing and if so, what the hell does that mean? Regressing into what??
What is the point of using terms with self-manufactured meanings for things that are already well defined? Does it not suffice to say testing? Regression testing is a ridiculous name. Equally ridiculous are the people who perpetuate this stupidity.
Good luck. I have found that regression tests often cost just as much as just paying someone to do the test. The only time they are an advantage is when you run them against the daily builds. The problem is when you do that every day one test will fail because of a new feature, and the test now needs to be changed, not a bug written up. (Of course you will catch bugs too) So you have to have a full time programmer who only job is to keep the regression tests up to date. This can be more expensive than just hiring testers. (Kids are cheap and most of them can operate a computer well enough to do your testing if you keep track of them)
Don't read too much into that downside. The more expensive programmer will in the end catch more bugs with the regression test suite, so your code has less bugs when you ship. However it is expensive.
Automatic regression tests are NOT a substitute for manual regression testing! You still need to plan on some time (though not the 3 weeks you did before) for regression testing, just to make sure the automatic tests didn't miss anything. Much of this will be done as part of your normal tests, but make sure you are watching for regressions when you test.
Keep in mind that if the UI or backend changes on a regular basis, you will also be making substantial changes to the automated tests. Part of this can be delt with by a good tool automatically, though for most substantive changes or ones that change the workflow in even minor ways that will not be the case.
Also, people tend to think that automated testing takes less time...it *CAN* though expect that on many projects it will take much more time as automated tests are detailed and implementation specific; you can't create tests at the spec level unless your specs are detailed design documents too and even then only in a limited way.
The time savings kicks in when you want to frequently repeat the tests across the whole project when even minor changes are made to the code in one place. It also allows you to be somewhat certian that only the things you expect to change do indeed change.
If you do not have the budget or time to do complete manual tests, forget about autmating it unless you are dealing with a very static project that requires excessively detailed testing.
I expect people to disagree on much of what I wrote above...when they do, keep in mind that situations can differ. These are just general rules of thumb and worked for the vast majority of projects I've been on.
A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.
How do you test features that are easy for humans to observe, but not as easy for software to detect (ie, the light came on, the GUI updated when I pressed the external input, etc)?"
For the GUI, I recommend instrumenting your app so you can programatically tell what's going on. An API is one way, but a quick and dirty way is just to keep an internal event log and then probe that. Then for free, you get a detailed log you can dump if there's an error in production.
For the physical hardware, consider building a simulator. You could do it partly in hardware, adding simulation logic to your hardware controller, but running disconnected from the machinery. Or you could build another board that connects to your production board's inputs and outputs and simulates the machinery at an electrical level. Another option is to simulate your production board entirely, leaving the embedded code out of the testing loop.
The right choices depend a lot on where you can get the best bang for your test automation buck. Unfortunately, starting with a lot of untested legacy code means you have a long slog ahead of you. Start with the modules that generate the most bugs, or the bugs hardest to find during manual testing and automate your tests of those. That will teach you a lot about good ways to test in your environment.
If you're not averse to proprietary software...
Mercury Interactive makes a great set of tools for regression and load testing. If the app is Windows based, WinRunner or QuickTest will allow you to script end-user actions for repetitive testing scenarios. LoadRunner is a great way to test a back end system, not just for load but also regression. And, if you're not useing a bug-tracking mechanism already, TestDirector is a nice web based tool for bug tracking that integrates well with the other tools.
I used these extensively for several years at a major entertainment company in Orlando to do testing, and they just flat work.
-- "Never underestimate the power of human stupidity." - R.A.H.
I've used a product called QFTest http://www.qfs.de/en/qftestJUI/ for performing long-term stress testing and functional testing on Java Swing applications.
It is similar to many of the other products that do automated GUI testing, but will run on Linux and Windows (others are very Windows centric). It is also is scriptable using Jython.
Doesn't relate directly to your needs but I thought others working with Java might find this information useful.
I love the sound of distortion in the morning -- webcommando
My previous project used JUnit very successfully, and had it integrated into their nightly build process. At the end of each day, all the developers checked in their modules and found out via the regression test reports the next morning, whether their changes caused someone else's module to blow up! :D
The friendliest digital photography forums on the net!
Reminds me of HP storage. They removed a scriptable, serial port CLI in favor of an IE-only interface. Guess which is harder to use and I imagine is a bitch to test. Layering the GUI on top of the CLI would have been my choice, as either a user or a tester.
Intron: the portion of DNA which expresses nothing useful.
I've used Rational TestStudio and EnterpriseStudio for doing just this sort of thing.
Other than having to give up your left testicle to afford it (I volunteered my boss for it), it proved itself quite capable of handling unit, integration, system, regression, and full-bore load testing. If you're also planning to do any load testing the "virtual users" will cost you the other testicle (I'd suggest you use multiple levels of management's PHBs - they get skittish after a couple of roosters become hens).
I'd recommend "floating licenses" over "node-locked" licenses if your testers are geographically dispersed.
On the upside; it's extremely easy to use, no problem integrating manual tests into the automated test suites, no problems integrating datapools from Excel spreadsheets (well, any CSV/TSV spreadsheet really). Our only problem arose with Java testing...none of us had any experience with Java other than simple javascripts for menus, so I can't honestly provide you with a review on its performance there.
I was part of the team that made the selection of the test suite for our company and customer.
We evaluated Rational, Mercury, and a few others I can't recall. We found Rational was easier to implement and integrate with our requirements management tool (which just happened to be Rational's RequisitePro). None of us - testers, tech writers, analysts, and management found the Mercury interface as easy to work with. I've seen Mercury put to use in quite a few places and all seemed to get the job done. I don't think you'll be poorly served by either.
YMMV
So, in the end (1) find one that can handle the specifics of your project (Mercury handles ActiveX better), (2) fits your budget, and (3) one who's interface doesn't make your work more difficult because you're having to constantly find things or look up how to perform them.
Now, if load testing HTML only is a desire, you may want to evaluate OpenSTA (www.opensta.org). It's free (in both respects) and a breeze to implement and use.
Hope this helps.
Concerning tools I'd only used compuware QA suite a lot of time ago. Was not so bad even if things that it's exactly cheap. In the company where I work today regression testing are performed using internal script (shell or other funky languages). I think each case should be considered differently... My understanding is that none can test WEB application using same methodology used to test matlab like application.
I problem we have today it's a conflict between R&D testsuites (corner cases, basic functionalities) and validation testsuites.
Sure the validation testsuites simulate the real world behaviour but we can't afford all this wasting of time every time we have to checkin.
At the end regression tests are there to improve productivity.
gourkha