Tag «ECL»

Q7 1.3.10 most noticeable improvements

New and Noteworthy, Q7, 15.01.2014 by Ivan Inozemtsev View Comments

Congrtulations on past holidays! On December 23rd we have released Q7 1.3.10 (the full list of resolved issues is available here), and in this post I’d like to describe a three improvements and bugfixes which I personally like the most.

Read more…

Happy Programmer’s day!

Q7, 13.09.2013 by Ivan Inozemtsev View Comments

Congratulations to all programmers with programmer’s day!

Just for fun, I’ve decided to solve a few problems from Project Euler using ECL :)

Read more…

Q7 1.3.7 released

New and Noteworthy, Q7, 9.09.2013 by Ivan Inozemtsev View Comments

In Q7 1.3.6, released a week ago we released two big new features – verifications and procedures. But we were too excited and hurrying to reveal these features, that made a few annoying bugs. Today’s version contains important bugfixes and small, but useful improvements. Full list of resolved issues is available here, and below just a few interesting improvements:

Read more…

Procedures and variables

New and Noteworthy, Q7, 3.09.2013 by Ivan Inozemtsev View Comments

While automated recording in Q7 works well, a lot of advanced users prefer to write ECL scripts manually, as it allows to create more flexible and maintainable test cases. In new version of Q7 we have significantly improved the expressive power of ECL by introducing user-defined variables (via let blocks) and user-defined procedures (via proc commands). Before going into details, here’s a simple example – suppose we are testing Java editor and would like to hover a ruler on a currently selected line. Here’s how it can be done without using variables in a plain old ECL:

  get-editor "Program.java" | get-left-ruler |
      get-ruler-column AnnotationColumn | hover-ruler 
        [get-editor "Program.java" | get-text-viewer | 
         get-property "caretPosition.line" -raw]

This is not so much easy to write, and, what is more impotant, not so easy to understand. Now take a look how the same actions can be expressed using variables:

  with [get-editor "Program.java"] {
    let [val currentLine 
           [get-text-viewer | get-property "caretPosition.line" -raw]]
        [val rulerColumn 
            [get-left-ruler | get-ruler-column AnnotationColumn]] {
        $rulerColumn | hover-ruler $currentLine

And if we need to do this operation multiple times in different scripts, we can rewrite it to a procedure:

Read more…

Script parameterization

Q7, 20.12.2012 by Ivan Inozemtsev View Comments

Note: this post is outdated and the same functionality can be achieved in more efficient way by using supercontexts.

One of the most asked features for Q7 is to execute a same test with different parameters. I’m going to demonstrate how it is possible to achieve the same effect using ECL. As an example, let’s test error messages in JDT New Class Wizard. We start with a Java project with a single class:

At first, let’s record an initial script which launches new class wizard, sets package and class name and asserts an error message:

get-view "Package Explorer" | get-tree | select example | get-menu "New/Class" | click
with [get-window "New Java Class"] {
    get-editbox -after [get-label "Package:"] | set-text "org.example"
    get-editbox -after [get-label "Name:"] | set-text Class1
    get-editbox -after [get-label "Java Class"] | get-property text |
       equals "Type already exists." | verify-true

Functional and UI Testing for Eclipse-based Applications

Test automation solution, handcrafted for Eclipse. Modern and easy to learn IDE.

Product Health Analytics and Support Automation Platform

End-user and product analytics solution that gives you rich insights into your application health & performance.

Eclipse-based IDE for the Fantom Programming Language

Full-featured Integrated Development Environment for emerging Fantom programming language.