RCPTT Documentation Center
  • User Guide
  • FAQ
  • Back to RCPTT Main Site
  • Eclipse.org
  • Get Started
  • Test Case Editor
  • Control Panel
  • Assertions
  • Eclipse Command Language
    • New ECL Command Guide
    • ECL commands for Excel import and export
    • ECL commands for XML import and export
  • Contexts
    • Workspace
    • Workbench
    • Launch
    • Preferences
    • Parameters
    • Group
    • Folder
    • Default
    • Super
    • ECL Script
  • Verifications
    • Text
    • Table/Tree
    • Error Log
    • Time
  • Procedures and Variables
  • Test Runner
    • Arguments
  • Maven plugin
  • RAP
    • Install instructions
    • Record and Replay
    • Capability Contexts
    • ECL commands
    • Maven plugin
  • Integration
    • TestRail
    • Zephyr

Assertions

Introduction

RCPTT supports two recording modes: the Recording mode and the Assertion mode. You can select any of them by clicking on the corresponding button of the the Control Panel toolbar. You can also use hotkeys to switch between them, which is useful for some cases when a mouse click affects the current state of any AUT elements. The hotkey hint is shown in the bottom of the Control Panel window.

In assertion mode you can verify any property of any widget (tree, button, text, canvas, etc.).

How it works

During a test recording switch to assertion mode:

Use button to switch to assertion mode
You can also use hotkeys to switch to assertion mode

Select any AUT widget you want to assert (you will see red frames). Let's say we need to assert that Finish button is disabled in New Java Class Dialog:

Once you select a button the assertion window appears containing widget properties with their values. Select the required one and press Add button:

The assertion code is added to your test script immidiately:

Negative case. How to assert the absence of the elements?

Sometimes we need to verify the absence of some UI element, like when we've deleted an item from a tree we need to verify that there is no such an item anymore.

We can do it with the help of verify-error command. Let's say we need to verify that there is no New/Java Project menu when we are in a Plug-in Development Perspective. So we add a negative assertion manually: