The code generation subsystem maps Load Test Behavior Model (LTBM) elements to objects of the code generation element model (IModelElement), which in turn are mapped to objects of its ILanguageElement class. As a result, a language element tree is created containing all equivalent elements of the behavior model test element tree and at the same time determines the structure of code to be generated.
Extend code generation
The language elements are typed, named, and have appropriate templates defined for them. Performance testing code generation takes place entirely within the Eclipse workbench. The Eclipse extension point mechanism is used for code generation extensibility to accommodate new protocols.
The plug-in...
com.ibm.rational.test.lt.codegen.core
...supports code generation for the generic Load Test script extending the class...
com.ibm.rational.test.lt.execution.core.impl.LTTestScript
...and generic test elements such as...
- loops
- containers
- transactions
- data pools
- generic content verification points
- data sources and substituters
- generic custom code
Specific protocols such as the plug-in...
com.ibm.rational.test.lt.codegen.http
...are implemented as extensions of the plug-in...
com.ibm.rational.test.lt.codegen.core
The plug-in...
com.ibm.rational.test.lt.codegen.schedule
...generates schedules implemented on top of...
com.ibm.rational.test.lt.codegen.core
For the code generation extension sample, see the plug-in...
com.ibm.rational.test.lt.sdksamples.codegen.socket
Related information
- Code generation
- Extension points for code generation
- Generate test code
- Create the script class
- Code generation templates
- New protocol extensions
- Public APIs of codegen.core
- API references