Step2- Generate & Build & Promote Stub

Refer tFunction: StellaTools.AutoTestBox.UI.Wizard.Wizard.2_Generate&Build

Initialization

The next step is to generate and build the stub so that it can be invoked by the wizard to register the test function's interface. During initialization of the step the following occurs:

  • Use model api PlexAPILib30.IPlexAPI.GetLocalModelPath to retrieve the local models Build file path
  • Read the build file to determine the WinC release directory in order to check when the dll has been built and where from directory to promote. 
[WinCFnc]
32targetdir=C:\StellaTools\ModelLocal\Objects
  • Read the build file to determine if truncate long file names at generation is on? If truncation is on and the stub name is greater than 8 then the step will not be able to continue as the stub needs to have a unique implementation name
[Name configuration]
Truncate long file names at generation=1
  • Read the build file to determine if name allocation is on? If off then region 1 becomes unprotected allowing you to specify your own implementation name (Standard Plex object naming rules apply)
[Name allocation]
Enabled=1
  • Get ATB application LoadLibrary setting for configurartion
  • Get the stub implmentation name if avalaible


Generate and Build

Once the stub has a valid implementation name either manually or allocated the stub will be generated and built via the model api PlexAPILib30.IPlexAPI.Build.


A similar workaround is used by checking the release directory for the dll and pnl existing with a creation date after the generate and build request time.


COMPILE Time: 
COMPILE : error C2143: syntax error : missing ';' before '.'
COMPILE : error C2059: syntax error : ')'
Stub was generated for action diagram debugging which is not allowed 




COMPILE Time: Visual Studio build time varies considerably with the size of the interface and power of the developer's pc. It is not unheard of for a DLL to be successfully built after 10 minutes so be patient.  



Deployed

Once the stub is built the dll and pnl are copied (overwriting any existing) to the configuration load library directory

STEP2 Over