• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

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?

Thanks,

Bernd
0
BAJ05
Asked:
BAJ05
  • 9
  • 4
1 Solution
 
sciuriwareCommented:
Please consider test driven development combined with JUNIT testing.

;JOOP!
0
 
sciuriwareCommented:
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.

;JOOP!
0
 
sciuriwareCommented:
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.

;JOOP!
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

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...
0
 
sciuriwareCommented:
In that case: use MAVEN: it runs all JUNIT tests in one command.

;JOOP!
0
 
sciuriwareCommented:
Refer to : http://maven.apache.org/

;JOOP!
0
 
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.

Bernd
0
 
sciuriwareCommented:
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)
      {
         doSomething();
   
.... 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.

;JOOP!
0
 
sciuriwareCommented:
Going off line now; Good night.
;JOOP!
0
 
BAJ05Author Commented:
Hmm,

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?

Thanks,

Bernd
0
 
sciuriwareCommented:
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!
;JOOP!
0
 
BAJ05Author Commented:
Thanks a lot for your comments.
0
 
sciuriwareCommented:
In a short time you will know this better than me: experience is unbeatable;
mine doesn't grow anymore as I'm retired.

;JOOP!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 9
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now