TRex

TRex Frequently Asked Questions

Table of Contents

  1. General
  2. Installing TRex
  3. Error Messages
  4. Using TRex
  5. Improving TRex

General

What does TRex mean?

TTCN-3 Refactoring and Metrics Tool.

What is TTCN-3?

TTCN-3 (Testing and Test Control Notation Version 3) is a test specification and implementation language used for black-box testing. It is actively used for conformance testing of SIP, IPv6 or UMTS parts, for example. Its syntax is similar to other popular languages, but contains language elements which are particulary useful for the black-box testing domain. Learn more about TTCN-3 on http://www.ttcn-3.org .

What is Refactoring?

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a 'refactoring') does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it's less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring. More information on refactoring is available on the Refactoring Home Page.

TRex supports automated refactoring for TTCN-3 based on our TTCN-3 refactoring catalog.

What are Metrics?

A software metric is a measure of some property of a piece of software or its specifications (http://en.wikipedia.org/wiki/Software_metrics). In TRex, metrics are used to assess properties like readability, reusability, and maintainability of TTCN-3 test suites.

Installing TRex

On which platforms does TRex run?

TRex requires Eclipse 3.2. (We recommend the latest release, but TRex is tested to work with any milestones and release candidates from 3.2M5 on.) Eclipse runs on a variety of hardware and operating systems, e.g. Windows, Linux (x86 and x86_64), Linux (PPC), Linux (ia64), Solaris (x86), Solaris 8 (SPARC), AIX (PPC), HP-UX (HP9000), Mac OSX (PPC), Mac OSX (x86). Currently, TRex is developed and tested on Windows XP and Linux x86 GTK. Experience reports on running TRex on other operating systems are welcome. More information on software requirements is available on the Features and Requirements page.

What to do if I get a "No features found on the selected site(s). Choose a different site or site category" message when trying to install a TRex release via the TRex update site?

You have probably previously installed a nightly build of TRex. Since the nightly build has already the version number of the upcoming release, Eclipse thinks the release is already installed. Therefore it cannot find a new feature and displays the above error which should correctly read "No new features found". Just uninstall your TRex nightly build before installing an official TRex release.

Why does "Search for updates of the currently installed features" not find new nightly builds from the nightly build update site?

Since the version number of the nightly build does not change (at least not every night, but only when a new official release is published), Eclipse's update manager thinks, the currently installed nightly build is still the latest version. Just use "Search for new features to install" instead!

Why does installation via the update site hang?

During the update site installation, Eclipse sometimes opens dialogs which are hidden behind other dialogs. These dialogs even block each other. Fortunately, one of these dialogs allows to "Run in Background" which resolves the blocking. (This seems to be resolved with latest versions of Eclipse 3.2.)

Error Messages

Why is the char synonym not allowed in TRex?

The char keyword is used for two different things in the current TTCN-3 specification. It is used for specifying UTF-8 char quadruples and as a useful synonym. Unfortunately, the quadruple is part of the specification language grammar making "char" a token which must be recognized by the Lexer. We decided to solve this conflict (for now) by disallowing the char synonym.

What is the reason and solution for out of memory problems?

When you open a TTCN-3 file in a TRex TTCN-3 editor, it (and the whole project) is analysed by TRex. This may take a while (up to several minutes for a several ten thousand lines of code test suite) and may require a lot of memory. By default, Eclipse uses 256MB of memory. If you experience out of memory conditions, increase the memory Eclipse uses, by adding a commandline switch to the eclipse command, e.g. -vmargs -Xmx512M .

Using TRex

What is the Template Coupling Metric displayed in the Metrics view?

For a description of this metric, please refer to our SAM'06 paper "Refactoring for TTCN-3 Test Suites" available on the Publications on TRex page.

Why are metrics and refactoring suggestions marker not calculated?

Since TRex 0.5.3 this is now performed as part of a "build process", i.e. when a "rebuild" of a TTCN-3 file is requested. Usually, this occurs each time you save a changed file. Sometimes, it may be necessary to provoke some changes by performing white space changes and save them afterwards. If metrics and markers are still not calculated, check the following:

  1. Is "Build automatically" enabled in the main menu "Project" menu?
    • Enable it or
    • select "Clean..." the main menu "Project" menu from manually to trigger a rebuild.
  2. Take care that metrics calculation and refactoring suggestion markers are actually enabled for your project:
    1. Open the project properties (by selecting a project in the Navigator and context menu or main menu "Project" > "Properties").
    2. Go to the "TRex Settings".
    3. Select "Enable Metrics Calculation and Refactoring Rule Detection". (If this setting was previously disabled, it might be possible that you need to trigger metrics calculation/issue detection by applying a change to a TTCN-3 file in your project and subsequently saving that change.)
  3. Make sure that TRex Nature is applied to your project. The metrics and refactoring suggestions marker are generated as part of the build process contributed by the TRex Nature. The project's folder gets a "3" (from the TTCN-3 logo) added to indicate that the TRex Nature is activated. If the Navigator view does not display the "3" for you project, please refer to the next question how to enable the TRex Nature.

How do I enable the TRex Nature for my project?

Usually this nature is activated automatically when you create a new TTCN-3 project or you are asked whether to enable it when editing a TTCN-3 file for the first time. However, once you denied to enable this nature, you will not be asked again. In this case you have to add the nature manually by editing the .project file as follows:

  1. By default, the .project file is hidden by a Navigator filter. Disable this filter using the Navigator menu by clicking on the little triangle on the upper right hand side of the Navigator view.
  2. In the .project file, replace
    <buildSpec>
    </buildSpec>
    <natures>
    </natures>
    
    by
    <buildSpec>
      <buildCommand>
        <name>de.ugoe.cs.swe.trex.ui.rulebuilder</name>
        <arguments>
        </arguments>
      </buildCommand>
    </buildSpec>
    <natures>
      <nature>de.ugoe.cs.swe.trex.ui.trexnature</nature>
    </natures>
    

What to do if my question on using TRex is not listed here?

Subscribe to the TRex user mailing list and pose your question there.

Improving TRex

How do I report bugs?

You may submit bug reports to our bug tracking system. More information on reporting bugs is available on the Reporting bugs page.

How may I contribute to TRex?

You are invited to contribute to TRex. There are several ways to contribute to TRex:

  • Contribute functionality (requires advanced Java programming knowledge)
  • Contribute JUnit Tests (requires little Java programming knowledge)
  • Contribute User Documentation
  • Contribute through using and testing (requires only TTCN-3 knowledge)

To contribute new functionality, you need to be familiar with Java, you need to be able to work with the documentation of the Eclipse API and you may need some basic knowledge about compiler construction techniques. For improving the built-in TTCN-3 parser, you need to be familiar with ANTLR 2.7.x.

The second way to contribute is to write unit tests using JUnit to improve the overall quality of TRex. The necessary programming knowledge is not as comprehensive, but some Java knowledge is still required.

Just like any other software, TRex also needs a proper user documentation. If your Java knowledge is limited, you may be helpful in writing and maintaining the user documentation in this wiki or in the HTML-based Eclipse help system.

Finally, if you are just using TRex, we would like to invite you to try recent nightly builds and send in feature requests and bug reports through our JIRA bug tracking system. The TRex stability can only improve with proper unit tests and people actually using it and reporting the problems. In addition, we are always eager to hear what kind of feature wishes TRex users have.

To get write access to the TRex source code repository or this Wiki, contact the TRex Maintainers. Check the Developer's Corner for further information.

I need feature XYZ, can you implement it?

You may add requests for new features to our bug tracking system. Since implementation of TRex features is driven by the contributor's needs, there is no guarantee that your feature request will be implemented. However, if you really want to have a feature implemented, you may hire us. If you do not like to have the resulting implementation being open sourced, the nature of the Eclipse Public License allows also to keep it closed by implementing it as a seperate plug-in. Contact the Maintainers for details.

YourKit Java Profiler