de.cau.cs.kieler.kies.transformation.test
Class TimeMeasurement

java.lang.Object
  extended by de.cau.cs.kieler.kies.transformation.test.TimeMeasurement

public class TimeMeasurement
extends Object

This JUnit tests serves as a kind of regression test for Esterel to SyncChart transformations. It executes several tests taking an esterel file and an expected synccharts sematic model (kixs). The esterel file is transformed and the resulting syncchart is compared to the expected one using EMFCompare. Keep in mind that this is a JUnit plugin test, hence it has its own workspace but the test files are kept in the original workspace. For this reason you currently have to define your workspace location relative to the junit workspace.

Rating red

Constructor Summary
TimeMeasurement()
           
 
Method Summary
 void calLevels()
           
 void compareHierarchyLevels(File strlFile)
           
 void measureTime()
           
static boolean performHeadlessTransformation(IFile kixsFile, TransformationUtil.TransformationType type)
          Performs a headless transformation on the passed kixsFile.
static boolean performHeadlessTransformationStep(IFile kixsFile, TransformationUtil.TransformationType type)
          Performs a headless transformation on the passed kixsFile.
static boolean performHeadlessTransformationWithSetup(IFile kixsFile, TransformationUtil.TransformationType type)
          Performs a headless transformation on the passed kixsFile.
 void setup()
          get the workspace root and open a project to work with.
 void test()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeMeasurement

public TimeMeasurement()
Method Detail

setup

public void setup()
           throws CoreException
get the workspace root and open a project to work with.

Throws:
CoreException - if anything goes wrong creating the project.

test

public void test()
          throws Exception
Throws:
Exception

measureTime

public void measureTime()
                 throws Exception
Throws:
Exception

performHeadlessTransformation

public static boolean performHeadlessTransformation(IFile kixsFile,
                                                    TransformationUtil.TransformationType type)
Performs a headless transformation on the passed kixsFile. The transformation can either be a Esterel to SyncCharts transformation or a SyncCharts optimization depending on the type parameter.

Parameters:
kixsFile - the file to transform.
type - TransformationUtil.TransformationType determining the type of this transformation.
Returns:
true if the transformation was successful, false otherwise.

performHeadlessTransformationWithSetup

public static boolean performHeadlessTransformationWithSetup(IFile kixsFile,
                                                             TransformationUtil.TransformationType type)
Performs a headless transformation on the passed kixsFile. The transformation can either be a Esterel to SyncCharts transformation or a SyncCharts optimization depending on the type parameter.

Parameters:
kixsFile - the file to transform.
type - TransformationUtil.TransformationType determining the type of this transformation.
Returns:
true if the transformation was successful, false otherwise.

performHeadlessTransformationStep

public static boolean performHeadlessTransformationStep(IFile kixsFile,
                                                        TransformationUtil.TransformationType type)
Performs a headless transformation on the passed kixsFile. The transformation can either be a Esterel to SyncCharts transformation or a SyncCharts optimization depending on the type parameter.

Parameters:
kixsFile - the file to transform.
type - TransformationUtil.TransformationType determining the type of this transformation.
Returns:
true if the transformation was successful, false otherwise.

calLevels

public void calLevels()
               throws Exception
Throws:
Exception

compareHierarchyLevels

public void compareHierarchyLevels(File strlFile)