Tuesday, April 7, 2009

Recursively rename files

I knew the command for finding files in recursive fashion + I knew command for renaming the files = I now know how to recursively rename the files

find . -type f -name *.txt -exec rename -v 's/.txt/.xml/' {} \;

Similarly, say for example if you need to recursively delete the (.exe) files from your USB stick, you may use following command:
find /path/to/usb/dir -name '*.exe' -print -exec rm -f {} \;

and to remove files below size 200 use command:
find . -type f -size -200 -exec rm {} \;
or somthing like
find . -name '*.exe' -exec rm {} \;

Hope this is helpful to other people too.

Wednesday, April 1, 2009

Automated GUI Testing Tools - Comparison Matrix

After spending much efforts of hunting down the best possible tool for Automated GUI Testing for RCP Application; we came up with the following extract:



Sr. No.ToolsAvailabilityProsCons
AbbotOpen SourceLibrary (Java)1. Programmatically drive UI components
2. Records user actions programatically
3. Tools build up using Abbot - Costello, Windows Tester, Rcp Robot
4. More suitable for AWTUnit / SwingUnit testing
1. No Automatic GUI Recorder
2. More Efforts on spends on writing Java Code
3. Time consuming.
CostelloOpen SourceRecorder (XML)1. Automatic GUI Recorder for AWT & SWING applications
2. Records user actions and facilitate script construction and maintenance
3. Useful for building Unit tests and Function tests
4. Records, Edits, playback XML scripts using Abbot
5. Provides a full-fledged script editor for the generated scripts
1. Currently not supported for SWT / RCP applications.
TPTPOpen SourceRecorder (XML / Java) 1. Allows Eclipse developers to automate regression tests
2. Supports Automatic GUI Recorder
3. Also supports performance and functional testing
1. User actions on native dialogs cannot be recorded because SWT events based on the actions are not reported
2. Keyboard shortcuts are not recorded when object-based recording is enabled
3. SWT does not report mouse / keyboard events when the user clicks a menu item on the menu bar or when the user clicks the native (minimize, maximize, close) buttons that appear in the right hand corner of applications in a windows environment.
SWT BOTOpen SourceLibrary (Java)1. Facility to record and playback scripts
2. Ant support for playback of test suites, reporting, and multi threaded playback
3. Test case execution is easily integrated into a continuous build system
1. Don't have ready-made automatic GUI recorder as well as script editor
2. Not sure about we can build script on top of SWT BOT to make automatic GUI recording
Windows TesterCommercial
Recorder / Library (Java)1. Test cases are based on the JUnit standard
2. Pure Java GUI test cases are easy to read
3. Test cases are customizable
4. You can re-factor GUI test cases easily
5. Provides a rich GUI Test library
6. Test case execution is easily integrated into a continuous build system
7. You can create new GUI test case support for GEF easily record and playback tests for Java GUIs using the Eclipse Graphical Editing Framework (GEF)
1. Not Open Source
RCP RobotOpen SourceLibrary (Java)1. Designed for specially for RCP applications
2. RCP Robot is an API on top of Abbot
3. They are used to write GUI tests in Java using some kind of testing framework
1. No automatic GUI recorder or script editor
2. Manual efforts needed to write the test cases using Java code
3. Difficult to changing the existing code when requirement changes