Squish 6.0 Beta with fully integrated BDD support released

About two years after the release of Squish 5.0, we are proud and excited to make available a BETA of Squish 6.0 to you.

The main new features of this release are fully integrated support for Behavior Driven Development and Testing (BDD) as well as major improvements to Squish’s reporting capabilities.

You can read the full announcement at http://www.froglogic.com/news-events/index.php?id=squish-6.0.0-beta-released.html.

A quick video introduction to Squish 6.0 and BDD can be found at http://youtube.com/embed/62Vrnb21hio?vq=hd1080&autoplay=1&rel=0&showinfo=0&autohide=1.

We will also host a live webinar showcasing what’s new in Squish 6.0 shortly. You find details about this in the above announcement.

We are looking forward to your feedback which we happily accept at squish@froglogic.com.

Squish tip of the week: Bring window to foreground

When working with multiple applications, or multiple windows in a single application, you can tell Squish to bring the desired window to the foreground before working with the window.

This applies to many different technologies or toolkits.

For example, when working with NSWindow on Mac OS X (Cocoa), given the name or title of the window, you can do the following:

def main():
    startApplication(...)
    ...

    objName = "{title='MyApp Window #1' type='NSWindow'}"
    waitFor("object.exists(\"%s\")" % objName, 20000)
    nsw = findObject(objName)
    nsw.makeKeyAndOrderFront_(nsw)

Read more about this Mac OS X Cocoa example, or other examples in the following Knowledgebase articles:

Remember; we’re always adding to our knowledgebase and other online resources to provide you with the most current and helpful information!

froglogic_cropped

Squish tip of the week: How to find answers to your Squish questions

There’s a wealth of Squish & Automated GUI Testing information at your finger tips. Sometimes the key is simply knowing where to look!

Visit our Squish Resources page

Squish tip of the week: Automate Business Rule Validation



Applications often have a set of business rules; rules that govern how an application should react based on a given set of input or actions. Or as Wikipedia defines it:

A business rule is a rule that defines or constrains some aspect of business and always resolves to either true or false. Full definition


Validate your application’s business rules using data-driven tests

Take a simple set of steps, perhaps even a Snippet of a Test Case, let’s say lines 7 – 10 in the following example:

def main():
    startApplication("AddressBookSwing.jar")
    activateItem(waitForObjectItem(":Address Book_JMenuBar", "File"))
    activateItem(waitForObjectItem(":File_JMenu", "New..."))
    activateItem(waitForObjectItem(":Address Book - Unnamed_JMenuBar", "Edit"))
    activateItem(waitForObjectItem(":Edit_JMenu", "Add..."))
    type(waitForObject(":Address Book - Add.Forename:_JTextField"), "sam")
    type(waitForObject(":Address Book - Add.Surname:_JTextField"), "smith")
    type(waitForObject(":Address Book - Add.Email:_JTextField"), "sam@smith.com")
    type(waitForObject(":Address Book - Add.Phone:_JTextField"), "123.123.1234")
    clickButton(waitForObject(":Address Book - Add.OK_JButton"))
Ask yourself (or better yet, your team):
  • What are the valid input values in each of these fields?
  • What values are not permitted in each of these fields?
  • Do the fields have any minimum character requirements?
  • Any maximum character requirements?
  • What should display in the event any of these requirements are not met? And when should it display?

Given answers to the above set of questions, you can begin compiling a collection of data to validate the business rules.

Business Rules Data Table
field input result_details comments
1 Forename sam Expected Result: input accepted without error
2 Forename s@m Special characters not permitted in Forename field Expected Result: Warning message appears immediately
3 And so on
Modify your Test Case to use the data

Use the Make Code Data Driven wizard to give yourself a jump start.

click to zoom

Then

  1. Update the text field to use the related variable(s) and
  2. Add a verification point to validate the expected result
Updated example

def main():
    startApplication("AddressBookSwing.jar")
    activateItem(waitForObjectItem(":Address Book_JMenuBar", "File"))
    activateItem(waitForObjectItem(":File_JMenu", "New..."))
    activateItem(waitForObjectItem(":Address Book - Unnamed_JMenuBar", "Edit"))
    activateItem(waitForObjectItem(":Edit_JMenu", "Add..."))
    
    for record in testData.dataset("businessRules.tsv"):
        field = testData.field(record, "field")
        input = testData.field(record, "input")
        result_details = testData.field(record, "result_details")
        comments = testData.field(record, "comments")
        textField = waitForObject(":Address Book - Add.%s:_JTextField" % field)
        textField.setText("")
        type(waitForObject(textField), input)
        waitFor("object.exists(':Address Book - Add.%s_Warning:_JLabel' % field)", 20000)
        test.compare(findObject(":Address Book - Add.%s_Warning:_JLabel" % field).text, result_details, comments)

Squish tip of the week: Reuse tests, scripts and test resources

What makes your test framework shine? Its re-usability of common actions and resources

All scripts, test data, verification points and even gestures in your Test Suite Resources are available to all Test Cases in your Test Suite.

Test Suite

It doesn’t stop there…

With Squish’s real-world scripting language support of Python, JavaScript, Perl, Tcl and Ruby, your scripts, even those independent of Squish, are also available using Squish’s Global Script view.

Global Script View Real-World Examples

Squish tip of the week: Create tests involving multiple AUTs

Squish can create and execute against tests against multiple Applications Under Test (AUT)

Switch between applications (for recording or playback) using Application Context.

Let’s say you are testing a chat application
  • Two chat sessions are interacting.
  • Even if one session is a Desktop application and the other is a Mobile App – it’s all possible!
Learn more here:

froglogic_cropped