?
Solved

java testing

Posted on 2006-04-01
13
Medium Priority
?
221 Views
Last Modified: 2010-03-31
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
Comment
Question by:BAJ05
  • 9
  • 4
13 Comments
 
LVL 24

Expert Comment

by:sciuriware
ID: 16350160
Please consider test driven development combined with JUNIT testing.

;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 16350164
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
 
LVL 24

Expert Comment

by:sciuriware
ID: 16350170
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:BAJ05
ID: 16350202
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
 
LVL 24

Expert Comment

by:sciuriware
ID: 16350209
In that case: use MAVEN: it runs all JUNIT tests in one command.

;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 16350214
Refer to : http://maven.apache.org/

;JOOP!
0
 

Author Comment

by:BAJ05
ID: 16350270
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
 
LVL 24

Accepted Solution

by:
sciuriware earned 1000 total points
ID: 16350388
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
 
LVL 24

Expert Comment

by:sciuriware
ID: 16350403
Going off line now; Good night.
;JOOP!
0
 

Author Comment

by:BAJ05
ID: 16360657
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
 
LVL 24

Expert Comment

by:sciuriware
ID: 16360811
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
 

Author Comment

by:BAJ05
ID: 16360888
Thanks a lot for your comments.
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 16360905
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month16 days, 5 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question