You can check the state of a checkbox, radio button, or the property of any other object or widget using Squish.
Using a test.compare() Verification Point
The line below looks at the object :Controls.My_CheckBox and indicates if the verification point passed or failed: passed if the checkbox is checked, and failed if the checkbox isn’t checked:
At times, having a script playback slower may be helpful.
The sample script below snoozes for 0.5 seconds between each step in main():
def for_each_call(frame, event, arg):
Read the following knowledgebase article to learn additional approaches:
Article – Slowing Down Test Script Execution
Need more detailed information in your test results?
Nightly or scheduled test runs results often provide valuable quick-read information.
What about times when verbose logging, or a Test Audit Log, may prove valuable?
The following example illustrates how to create a fully-customizable Test Audit Log using Squish. Each action is modified to include a log message and description when executed. Simply calling the enableVerboseLogging() function from the main() test case activates verbose logging.
Functionality available for all Squish-supported scripting languages and application toolkits. Example in Python using Java Swing application.
# activate item
test.log(logText, 'Activated item %s' % objectMap.
# click button
def wrappedFunction(button, logText="clickButton()"
+ " called"):
test.log(logText, 'Clicked %s' % objectMap.
# mouse click
def wrappedFunction(objectToClick, posX=None,
test.log(logText,'Mouse clicked %s' % objectMap.
def wrappedFunction(objectToTypeIn, stringInput,
test.log(logText, 'Typed %(text)s in %(field)s'
# call Squish function modifications
test.log("Verbose logging enabled")
activateItem = alterActivateItem(activateItem)
clickButton = alterClickButton(clickButton)
mouseClick = alterMouseClick(mouseClick)
type = alterTypeFunction(type)
Looking for the answer to a 64-bit build question I ran into a news item titled “The Unicorn Getting Interested in KDE“. Since I never saw an unicorn before this made me curious.
Turns out that a company selling a static code analysis tool has been analysing KDE code. This is not the first time some provides such feedback to Open Source projects. Did this
My favourite finding is this redundant if() statement:
if ( type == "String" ) t += defaultValue; //<==
else t+= defaultValue; //<==
Can anyone tell how old the KDE code base is? And did they approach anyone from the project, yet? The posting is just two days old but it might already be old news in todays age...
Last year we started receiving the first requests for QML coverage. “Sure. We’ll look into it.”, we replied. It seemed like a logical extension of our cross-language coverage tool Squish Coco. At least on first sight.
At this year’s Qt Contributors’ Summit the question came up independently in one of the sessions. I had nothing to show back then. But now, there’s finally a prototype accomplishing a proof of concept. To be seen live in action at froglogic’s Qt Developer Days 2014 booth.