java testing

Given that you are programing a really big package and need to test it for each new release.

How would you do this?

I would like to set up another program that automatically records key strokes and screen shots and the plays the keystrokes back, compares the screenshot and reports back what is working and what not.
Does something like that exist?

How are big software comanies doing it?


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Please consider test driven development combined with JUNIT testing.

This means that:
1) tests are written from the design PRIOR to the application code,
enabling to test every stage of the implementation.
2) JUNIT tests (automatically generated by (e.g.) ECLIPSE) provide
a tight test repertoire the quickly test the application after every "improvement" later
when the developers have gone to a next job.

I have bad experiences with life recording of input and output.
You might apply that kind of tools to instruct the end user
for use of the new software, but it's very hard to justify
the enormeous amount of work that goes in that type of testing.

Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

BAJ05Author Commented:
JUNIT testing is already implemented and working, but in the end you need to still test the functionallity by just using the product. Here there should be some structure in order to waist as little time as possible. I am interested in this type of end-user testing...
In that case: use MAVEN: it runs all JUNIT tests in one command.

Refer to :

BAJ05Author Commented:
This would ensure me that the functionallity of the project would conform with the UNIT tests I set up. What if some of the design is flaw? This would usually come out at the beta test level of even afterwards. Are you saying that one should translate these tests into UNIT tests?

Then what happens if someone forgets to assign some functionallity to a button on the menu? How are those things usually tested?

I hope you understand my problem.

First of all: small projects and huge projects start on writing paper (or should).
This means that all controls (like buttons) are fully listed in the ergonomical reports.
A good design contains the skeleton of the flow, test plans, critical sections and a time plan.
It should not happen that there is a button that's not on the list (and not in the test plan).
A button not serviced can be overcome by starting the accompanying 'actionPerformed()' as:

   /** (non-Javadoc)
    * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
    * @param a action event.
   public void actionPerformed(ActionEvent a)
      Object o = a.getSource();

// Buttons on section 1 :

      if(o == firstButton)
.... and making the GUI builder class implementing 'ActionListener', giving
direct access to all related data: the comparison of 'o' directly to the button
avoids typo's like in action command string comparisons.
Finally close this method as:

// Safety catch:

      else                             // Action forgotten?
         error("Unserviced button: " + a.getActionCommand());

It is hard to give a complete overview but that's the way I have contributed to large projects
over the last 20 years.
Hope it helps you a bit.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Going off line now; Good night.
BAJ05Author Commented:

I get the impression that the things I am asking for are not supposed to happen and should be dealt with before even implementing...
In principle I would agree, but I haven't seen anyone or any team so far that was able to give a flawless design. In our case we are implementing for a somewhat anonymous user group. So we have to anticipate what functionality they want. By the way, with the technologies evolving so rapidly the user's demand is also changing, too. Especially when changing strategies you have the problem of making mistakes.
I guess everything boils down to the following question:

Do you believe that all the testing can be done with unit testing?

If I understand your code from above correctly there are ways to test GUIs programmatically.

Could you please comment?


Questions that have "all" or "always" or "everything" tend to be answered "no".

If you don't know the end user too well, have a good guess.
More important is: will the produce be accepted "as is"?
I mean: in many contracts the produce will be accepted when
"almost" error free and complete. Then, what is the deal with changes and repairs?
In other contracts there is room for improvement and (limited) after-support.

I worked for a bank that had a big budget to spend on contact with the end user
and correcting the "face" of the application to his/her needs.

Conclusion: what's the contract (fixed price / hours spend) (as is / to improve)?
I can only avdice to prepare for the worst and apply all testing to the core parts,
because whatevey you change or improve: that must work flawlessly.

P.S.: I've seen some visual testing products: shit!
Lots of success!
BAJ05Author Commented:
Thanks a lot for your comments.
In a short time you will know this better than me: experience is unbeatable;
mine doesn't grow anymore as I'm retired.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.