Injecting O2 into IBM Rational AppScan Standard
If you use AppScan Standard (the BlackBox tool) and want to use O2 to script its GUI or scans, here is a new O2 script that will start AppScan Standard under the same process as O2.
Once the main AppScan gui is loaded this script will add a new O2 Menu and inject an O2 Script editor.
You can find the script that automates the process in your local folder C:\O2\O2Scripts_Database\_Scripts\3rdParty_Tools\IBM\AppScan_Standard:
The script you want to execute is the Util – Launch AppScan Standard (O2 version).h2 which will
- Copy all required files (O2 dlls and AppScan_Standard_1st_Script.cs Script) to the AppScan Folder.
- Compile the AppScan_Standard_O2_Launcher.cs script into AppScan_Standard_O2_Launcher.exe and copy it to AppScan folder
- In the AppScan folder: execute and compile AppScan_Standard_O2_Launcher.exe
- The AppScan_Standard_O2_Launcher.exe will compile the AppScan_Standard_1st_Script.cs and execute it
- the AppScan_Standard_1st_Script.cs script will:
- open an O2 Log Viewer (so that you get a feel for what is happening),
- launch AppScan (by using reflection to open the MainForm Form control),
- wait for the main AppScan gui to load, and when it does:
- compile and execute the In AppScan – Create O2 Gui.h2 script
- The In AppScan – Create O2 Gui.h2 script is the one that adds a new menu item and injects a O2 Script editor into the main AppScanGui.
The Util – Launch AppScan Standard (O2 version).h2 has an editor for all these scripts, but by default this is disabled (see NUnit example for details). The default behaviour of Util – Launch AppScan Standard (O2 version).h2 (when double-clicked from windows explorer) is to execute the above steps in sequence. And if all goes according to plan, you will see the following ‘AppScan Standard – O2 Version’ GUI:
… note the extra O2 Menu and the O2 Scripting Environment….
For reference, here is what it looks like while AppScan Standard is loading up (the cmd.exe window was created by AppScan_Standard_O2_Launcher.exe and the LogViewer shows the wait for the main AppScan GUI to load up)
These series of scripts are heavily based on the ones previously used and documented in the Injecting O2 into another .NET Process (in this case NUnit.exe) script (see that blog post for more technical details about how this works).