Monday, February 23, 2009

Installing CubicTest

Have you ever been in need of an advanced testing tool that makes it easy to:
  • Test your web-applications by interacting with them as an human user would do
  • Let you define test-steps by drawing simple flow-chart-like diagrams
  • Auto-draw the test-steps by recording your actions from the browser window
  • Automatically re-execute so-recorded texts against a web-browser
Well, this kind of tool really exists: it's CubicTest and in the last days it really lived up to its promises.

In just one day I wrote a complete test-plan and linked each one of the tests planned to a testcase created with CubicTest.
And not only I "wrote" the tests by simply recording my activities inside the browser, but I also left CubicTest the task of executing them automatically, presenting me with the exact step where the failures occurred.

This way I obtained a "real" test-plan, consisting of human-readable, auto-generated and repeatable acceptance-tests.
Something I could easily bundle into an Eclipse application that could be used by my customers when they will try out my project.

Here's how to install CubicTest:
  1. Download and install Eclipse at http://download.eclipse.org
  2. Add the following update site to Eclipse: http://boss.bekk.no/cubictest/update/ (or download it from http://boss.bekk.no/cubictest/download.html)
  3. Select the CubicTest plugins and install them
  4. When asked whether to apply the changes or restart click "Apply Changes" and then manually shut-down Eclipse
  5. Open the eclipse.ini configuration file (/path/to/eclipse/eclipse.ini or C:\Program Files\Eclipse\eclipse.ini) and add the following line:
  6. On Linux: -DfirefoxDefaultPath=/path/to/firefox_installation/<firefox_executable>
    On Windows: -DfirefoxDefaultPath=C:\path\to\firefox_installation\firefox.exe
  7. Start Eclipse
  8. Follow the tutorials provided by the CubicTest Team and start using it

Let me know if you like this tool (by clicking the title of this post and leaving me a comment).

9 comments:

  1. Hi, Can I able to use IE instead of firefox for recording the scripts?

    ReplyDelete
  2. I'm checking this possibility: I think we must verify whether a Selenium plugin exists for IE.
    If yes, then the answer to your question will be "yes" as well.
    Look for the updates, I'll post them here as a comment and as a new blog-post as well.

    ReplyDelete
  3. Hi Gobi. I just found we are unlucky: as stated in the official CubicTest tutorial "the recorder requires that Firefox or Opera is installed". See this page for further informations: http://seleniumhq.org/about/platforms.html#browsers.
    Best regards,
    Nicola Orritos

    ReplyDelete
  4. You are correct the the recorder does not work in IE, but you can run the tests in the IE browser.

    The browser can be changed in the testname.att.launch file that is created the first time you run the test. I found this in the same directory as the testname.att file.

    There is also a property in the test-project.properties file. I think this will change the default browser for future Run As configurations that you create, but I've not tested that.

    Also, I think you can just duplicate your .launch file and have one for each browser you want to test with so that you don't have continually change them to switch browsers.

    FYI. I'm running eclipse 3.5 with CubicTest 1.9.6

    Hope this helps

    ReplyDelete
  5. hi
    I am using eclipse 3.5 and cubictest 2.0.3 (i think) but I do not see any CubitTest perspective.

    Can you please give me some pointers on what I may be doing wrong. I see CubicTest in my installed software list in eclipse.

    thanks
    manu

    ReplyDelete
  6. Hi Manu. I'm currently on vacation, sorry :-) Just tell me whether or not you can see the menu item "Window > Open Perspecive > Other... > CubicTest". If you can't see it I think your plugin is not actually installed (you can also check the installed plugins via "Help > Software Updates"). Monday I will answer other questions, if you'll have any.

    ReplyDelete
  7. Thanks for the hint to use firefox, I had a problem with configuring CubicTest and SeleniumRemote server..

    DfirefoxDefaultPath=C:\path\to\firefox_installation\firefox.exe

    ReplyDelete
  8. WOW the eclipse config you gave fixed my problem. it was asking for firefox 3 to be set in the environment variables.

    ReplyDelete
  9. Glad to here that anant. Also check updates on CubicTest web-site, as this blog post is getting old :-)

    Nicola

    ReplyDelete