Interpose

Interpose processing is a feature that handles variable before and after the execution of measurement item. To create interpose processing, specify the process flow by interpose algorithm and specify process condition by interpose condition. Followings are the examples of interpose processing:

Interpose ProcessInterpose AlgorithmInterpose Condition
Wait 2 seconds before measurementWait Time before Measure ItemWait Time: 2 seconds
Assign the measured value of I/O1 pin to specified variableStore Pin Result ValuePin: I/O1

CloudTesting Lab has basic interpose algorithms. Customers can develop interpose algorithm by themselves using Java.

Use standard interpose algorithm

CloudTesting Lab has following basic interpose algorithms.

Basic Interpose Algorithm
Name Process Pre Interpose Post Interpose
Set Variable Assign the result of the expression to the specified variable Executable Executable
Wait Time before Measure Item Wait for the specified time before measurement. Executable In-executable
Wait Time after Measure Item Wait for specified time after measurement. In-executable Executable
Store Pattern Result Assign the result of function test to the specified variable. In-executable Executable
Store Pin Measure Value Assign the measured value of the pin to the specified variable. In-executable Executable
Store Pin Result Value Assign the measurement result of the pin to the specified variable. In-executable Executable
Store Comment Measure Value Assign the measured value of comment to the specified variable. In-executable Executable
Store Comment Result Value Assign the measurement result of the comment to the specified variable. In-executable Executable

Develop interpose algorithm by yourself

If you want to develop interpose algorithm by yourself, you can do it by Java.

You can develop interpose algorithm in the following procedures:

Step Procedure Content
1 Install JDK 8 To develop using Java, install JDK8(Java SE Development Kit 8) Windows x64. Add JDK bin directory to Path to use JDK commands on command-line.

set Path=%Path%;Path\to\JDK\bin

2 Create source code Create source code(.java). Inherit one of the following depending on the executing order.
AbstractInterposeForBeforeMeasureItem
This is the base class which should be inherited by interpose algorithm for pre measurement.
AbstractInterposeForAfterMeasureItem
This is the base class which should be inherited by interpose algorithm for post measurement.
3 Compile source code Compile source code(.java) by javac command included in JDK.

javac -classpath "%ProgramFiles%\CloudTesting\interpose\release\CTLab_Interpose.jar" -d . -encoding utf-8 Example.java

If succeeded to compile, Java class file(.class) is generated.
4 Archive Java class file Archive Java class file(.class) by jar command included in JDK.

jar cvf Example.jar com\*

If succeeded to compile, Java archive file(.jar) is generated.
5 Place the Java archive file Place the Java archive file(.jar) to the following path:

%ProgramFiles%\CloudTesting\interpose\custom

6 Use on CloudTesting Lab Launch CloudTesting Lab on Expert mode. Added interpose algorithm will be displayed on the interpose processing list.

Handle variables on Interpose Algorithm

To handle variables on interpose algorithm, use InterposeVariable class.

Followings are the readout methods.

Return Type Name Arguments Description
Integer getIntegerValue - Get the value of integer type variable. If the variable type is list, the value of first element will be returned.
Long getLongValue - Get the value of long type variable. If the variable type is list, the value of first element will be returned.
Double getDoubleValue - Get the value of double type variable. If the variable type is list, the value of first element will be returned.
Boolean getBooleanValue - Get the value of boolean type variable. If the variable type is list, the value of first element will be returned.
String getStringValue - Get the value of string type variable. If the variable type is list, the value of first element will be returned.
Integer getIntegerValue Integer... indexes(*1) Get the integer value of the variable at index.
Long getLongValue Integer... indexes(*1) Get the long value of the variable at index.
Double getDoubleValue Integer... indexes(*1) Get the double value of the variable at index.
Boolean getBooleanValue Integer... indexes(*1) Get the boolean value of the variable at index.
String getStringValue Integer... indexes(*1) Get the string value of the variable at index.
List getIntegerValues - Get the values of all integer type variables.
List getLongValues - Get the values of all long type variables.
List getDoubleValues - Get the values of all double type variables.
List getBooleanValues - Get the values of all boolean type variables.
List getStringValues - Get the values of all string type variables.

1 Specify the index of list variable. If the variable is multidimensional array, required number of arguments equals the number of its dimension.

Followings are the writer methods:

Return Type Name Argument Description
void setVariableExpression String value Set the result of given expression.
void setIntegerValue Integer value Set the value of given integer value.
void setLongValue Long value Set the value of given long value.
void setDoubleValue Double value Set the value of given double value.
void setBooleanValue Boolean value Set the value of given boolean value.
void setStringValue String value Set the value of given string value.
void setIntegerValue Integer value,Integer...indexes Set the given integer value to the list at index.
void setLongValue Long value,Integer...indexes Set the given long value to the list at index.
void setDoubleValue Double value,Integer...indexes Set the given double value to the list at index.
void setBooleanValue Boolean value,Integer...indexes Set the given boolean value to the list at index.
void setStringValue String value,Integer...indexes Set the given string value to the list at index.
void setIntegerValues List values Set the list of interger variable. If the number of given list elements is smaller than its number of list element, error is occured.
void setLongValues List values Set the list of long variable. If the number of given list elements is smaller than its number of list element, error is occured.
void setDoubleValues List values Set the list of double variable. If the number of given list elements is smaller than its number of list element, error is occured.
void setBooleanValues List values Set the list of boolean variable. If the number of given list elements is smaller than its number of list element, error is occured.
void setStringValues List values Set the list of string variable. If the number of given list elements is smaller than its number of list element, error is occured.

Sample Code of Interpose Algorithm

This is a sample code of interpose algorithm.

The source code can download from following link.

Sample Code of Interpose Algorithm

This sample include the following codes:

ContentFile Name
Print “Hello”Hello.java
Print the message specified by interpose parameterPrintMessage.java
Pause at after measurementPause.java
Print the number by specified formatDisplay.java
Stores the products of the multiplicands and the multiplier to an array variableMultiplier.java
Stores the mean of the population to a variableMean.java
Updated at
January 01, 2017