keysight_articles upload_to_live

Can I generate a testplan automatically from my test specification?

Can I generate a testplan automatically from my test specification?

Yes you can, but you will have to write some of the necessary code yourself, since Keysight cannot know in advance how your test spec is constructed. To access the feature, download the file tstgen.dll from this site and add the following to the preferences.upf file in the [Tool] section: Toolxx= TestGen;DLL;c:\Program Files\ Keysight\TestExec SL 4.1\ bin\tstgen.dll ASCII_File_Import (all on one line; replace the "xx" with the next number in sequence) You will also need to create at least one test library. First, create a new directory (anywhere) called "Test Libraries". Go into TxSL and start a New Testplan. Create an empty test (no actions). Name the test "dummy". Go to "File/Save Test Definition" and name the file dummy.utd. Save it in the Test Libraries directory. In Notepad, create a file named, say, autotpa.txt and put the following in it (for example): "1.0.1 Initialization",0,: Library, 0,dummy.utd "2.0.1 Input parametric",0,: Library,0, dummy.utd "3.0.1 Output parametric",0,: Library,0, dummy.utd "4.0.1 Power up",0,: Library,0, dummy.utd "5.0.1 Download",0,: Library,0, dummy.utd "6.0.1 Output loads",0,: Library,0, dummy.utd "7.0.1 Functional",0,: Library,0, dummy.utd "8.0.1 Power down",0,: Library,0,dummy.utd (replace dummy.utd with the complete path including dummy.utd) Now, if you're still in TxSL, delete the dummy test you just created. Then select Tools/TestGen and double click your autotpa.txt file. The text inside the quotes in the autotpa. txt file should now be in the left pane of the TxSL window. The report window will tell you if there are any errors. Note that if the dummy.utd file actually has useful stuff in it, all relevant actions and parameters will have been copied into TxSL as well. By writing a program that reads your test spec and then writes the autotpa.txt text file, it is thus possible to automatically 9 generate at least the names of the tests automatically. If you want to go farther, you could scan the spec looking for particular types of measurements and then load UTDs that are closer to what might be needed (say, one with a switching statement and a MeasureDCV, for example). Known bugs: If you use ",," to specify the unused parameters in the autotpa.txt file, you will get the error message "Field missing". Use ",0," instead. ":Library" is case sensitive. If a testplan is loaded already when you run this, it will put the items contained in the text file at the end of the testplan, but it will rename the test contained in the first line of the text file to whatever the UTD file used as its name. If the testplan that's loaded is the one you just created by running TestGen and then you make a change in the text file and run TestGen again, nothing will change and no errors will be generated.

Was this answer helpful?

0 found this article helpful

Related questions