Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Creating BuildInfo File automatically - SC 18.0 and above

Creating BuildInfo File automatically - SC 18.0 and above

This article is a follow on from our previous Knowledge Base article relating to the creation of the BuildInfo file prior to SC 17.0: https://community.microfocus.com/borland/test/silk_central/w/knowledge_base/27380/creating-buildinfo-file-automatically

Due to the changes in the location of the BuildInfo file, the steps and arguments now differ from this previous article so I will detail the changes below. The code needed now will be different from the previous article. If you need a copy of this, please log a support incident and this will be supplied along with the needed jar file. 

The BuildInfo.xml files are now stored in the ProgramData folder in the following path for each instance: C:\ProgramData\SilkCentral\<instance_name>\BuildInfos.

To use the jar file:

1. Open up a command window, and run the following command:
java –cp <location of jar file> buildinfo.XMLWriter “<Product>” "<Version>" "<Build>" <Path to BuildInfo>

eg:
java -cp "C:\working\BuildXML3.jar" buildinfo.XMLWriter "Demo Product" "AutoVersion" "AutoBuild" "C:\ProgramData\SilkCentral\instance_1_silk\BuildInfos\BuildInfo.xml"

- This will then create your BuildInfo.xml file and also test that the command works correctly.

 

2. Modify the Silk Central Project Settings so that the file the Project is looking for is BuildInfo.xml.

 

3. Create a test in Silk Central, which will allow this test to be run before the executions.
On a Test Container right-click and create a new Test using the Type ‘ProcessExecutor Test’, which will allow you to configure the properties to run the jar file through the command line:

- Make sure to enter the full argument from /c onwards within quotations - shown above in my argument list.

*For Windows 10, I had issues with the location of the java.exe file. 
- I had to specify the full location of my java install location as shown above
- You may not need to do this as Java might work without this being specified

4. You must now specify the parameter values from the argument above. This is done within the Test Parameters on the Properties tab.
Enter each of the parameters at the Test level. You can leave these blank here and specify them within the Execution Plan. The Plan will detect these automatically and allow you to enter values from the Plan Properties. 

 

5. Now that it is configured, this test can be added to an execution plan. You can make this a Master Execution Plan so that when run, this script will execute first. 
This Execution Plan will then create the new BuildInfo.xml file, add the new parameter values specified and then run the dependent execution plan using the new Buildinfo.xml that has been created.

If you have any questions or issues when configuring this, or would like a copy of the .JAR file then log a Support Incident and the JAR file and additional support can be provided.

SI: 3141677

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2018-02-06 10:33
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.