• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

automated testing for swing program?

 
Ranch Hand
Posts: 630
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I write swing program with the help of coderanch posts,
program some thing like JDialog holds JPanel which holds lots of small JPanels which have feature like drag-drop by mouse.

now my question is, for checking my code works right or after some time it go wrong, i drag panel here & there frequently. I drag one small panel over another small panel & try to see it save overlap or not, or try to drag beyond the boundaries.
But doing this after 50-100 drag event my hand in pain...so as i heard there are lots of automated testing tools for test various types of programs.
So for this kind of swing program. is there any automated testing tool?
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As a code rancher since 2007 I am sure that before asking this question, you searched the web for gui testing tools. So it would help if you told us which ones you have tried and why they didn't meet your needs so that people here can make suggestions that better fit your requirements.
 
Mandar Khire
Ranch Hand
Posts: 630
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Joanne Neal, for reply.
I am sorry for not posting question with proper way so people here can make suggestions that better fit requirements.
I try to explain what i done last few days regarding this question as bellow:-
My code as bellow:-
Program contain 2 java files, 1st as Testing1.java & 2nd as holdingPanel.java


holdingPanel.java


I try very basic only swing program for testing, if my concept clear then i will try it on swing+jdbc+hibernate+
mysql+asteriskjava program.
so for clearing concepts i do following:-

1. I search google automated testing for swing java gui.
By this i got info about 3 things
1. java.awt.Robot
For this i again search google java.awt.Robot, mouse drag
By this i found small code like this:-

I am thinking & trying how to use it in my code.
2. i read wikipedia.
Still i confuse about few points:-
1. As different IDE's we can see code & we have debug/run buttons which testing tool is giving same functionality with better performance? eg in perticular app i will open my java files, then i can enter how many time i want to test it & how...somthing GUI format....?
2. For many techniques, i have to write small piece of code & add it into the my code then run all thing & do nothing till testing not finish...
3. Many GUI testing is like some textbox , button, we should check, in textbox some text enter & then click on button & see result & this process for many times. but not always GUI means some input in text or list or combo boxes or fields etc.

I know i stretch this reply too far, but for explaining this is important to me to write all things.
 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The IDE debugging options and using them to test is not really testing. Or at best, it can be called manual testing.
The idea of automated testing is to test something and add assertions - so that when the assertions fail, we will know instantly. And, unlike manual testing, automated tests can be repeated very quickly.

As for such a record-playback testing of Swing GUI programs, you can check out marathonman.
reply
    Bookmark Topic Watch Topic
  • New Topic