Highlighted
torreytsui Absent Member.
Absent Member.
2415 views

API Generation

Jump to solution

Having a healthy program evolution, writing comments and descriptions nearby source codes is a good practice.

 

Our team has done so in SilkTest WorkBench, and we have obtained its benefits such as the features of IntelliSense.

In addition, we want to generate an API document of our project.

There is an Open Source software - Sand Castle -  to generate it, but it requires the source codes file or VB.NET project as input.

 

Can we export the source codes from SilkTest WorkBench?

 

Thanks a lot!

0 Likes
1 Solution

Accepted Solutions
jflassonde Absent Member.
Absent Member.

RE: API Generation

Jump to solution

The post AndySchott is talking about might be a comment of mine I made under a feature request :  borland.uservoice.com/.../2917522-silktest-workbench-find-replace-text-in-all-scri

Here it is:

There is no way to easily manipulate the files. They are more or less locked inside the SilkTest Workbench environment. Even using the Export Assets feature, the files are not transformable because they are exported as XML with the actual text encoded in Base64.

Currently, we use a home-made AutoHotKey (http://www.autohotkey.com/) script to automatically open each SilkTest script and extract the content into a text file. Then we use sed (en.wikipedia.org/.../Sed) on the whole collection of text file to do our replacement. Finally, using AutoHotKey again we automatically open each SilkTest script and copy-paste from the modified text file. All that is done semi-automatically, but it still takes a few hours!

We have this semi-automatic process and going from SilkTest 2010 to SilkTest 13 was a pain because of a few changes we were forced to do.

It would be really useful if there was a built-in way to do a Search and Replace (supporting regex please!)

0 Likes
5 Replies
AndySchott Absent Member.
Absent Member.

RE: API Generation

Jump to solution

There is currently no automated way of exporting the code for scripts in the Workbench. You might consider requesting a feature to provide a way of generating API documentation for scripts in the Workbench database.

0 Likes
torreytsui Absent Member.
Absent Member.

RE: API Generation

Jump to solution

Is there any workaround solution?

For example, by joining the database tables, retrieve each .Net Script file.

0 Likes
AndySchott Absent Member.
Absent Member.

RE: API Generation

Jump to solution

Reading the data directly from the database isn't supported.

I seem to recall someone posting here that they had some sort of automated solution of getting the code in a script, pasting it into a text editor, modifying it, and then pasting it back in to the script. I think this was used to do some sort of refactoring, but I'm not positive about that. If you could find that post, you could probably do something similar in order to generate API documentation from your scripts.

0 Likes
jflassonde Absent Member.
Absent Member.

RE: API Generation

Jump to solution

The post AndySchott is talking about might be a comment of mine I made under a feature request :  borland.uservoice.com/.../2917522-silktest-workbench-find-replace-text-in-all-scri

Here it is:

There is no way to easily manipulate the files. They are more or less locked inside the SilkTest Workbench environment. Even using the Export Assets feature, the files are not transformable because they are exported as XML with the actual text encoded in Base64.

Currently, we use a home-made AutoHotKey (http://www.autohotkey.com/) script to automatically open each SilkTest script and extract the content into a text file. Then we use sed (en.wikipedia.org/.../Sed) on the whole collection of text file to do our replacement. Finally, using AutoHotKey again we automatically open each SilkTest script and copy-paste from the modified text file. All that is done semi-automatically, but it still takes a few hours!

We have this semi-automatic process and going from SilkTest 2010 to SilkTest 13 was a pain because of a few changes we were forced to do.

It would be really useful if there was a built-in way to do a Search and Replace (supporting regex please!)

0 Likes
torreytsui Absent Member.
Absent Member.

RE: API Generation

Jump to solution

Thank you!

This is a good idea. Simple and workable. Upon on your idea, I am now trying to build it on SilkTest then playback through commands so that lots of resource can be reused.

On the other hand, I have found that SilkTest's export funciton can generate a single xml file containing all scripts, but they have been encoded in base64. An alternative will be building a converter to retrive scripts from this xml file.

0 Likes
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.