Script project
3 minute read
A Python project contains the programme for an automated test.
Create a new script project
To create a new script project, open the script project service window in the Toolbar of the Python Script module with the new file tool . Select the project type, name and storage location of the project.
Now you can add your files to the project.
Adding items to a script project
Right-click on the project in the Project Explorer to open a context menu.
You can select among the following items:
-
Add New Item
-
Add Existing Item
-
Add Existing Folder
Add new item
If you clicked the button Add New Item… in the context menu you can select the type of item you want to add and enter the name of the item.
Empty Python file |
Creates a new .py file |
Python module |
Creates a new .py file with standard header. |
Empty Python package (folder and __init__.py file) |
Creates a folder with the name of the item. This folder contains a file __init__.py |
Folder |
Creates a folder. |
Set the entry point for the script project
To define the entry point for the script project, a .py file must be selected as the start file.
Procedure:
-
Select the desired .py file in the Project Explorer
-
Right-click to open the context menu
-
Select Set as Start File from the context menu
To run the script project (.lsproj file), you must select a .py element by selecting Set as Start File. |
Releasing the script project
A standard user cannot execute a script project that has not been released. If a file in the project is changed, the release expires and thus it is certain that no testing can be done with a manipulated script. Double-click on the script project (.lsproj file) in the Project Explorer to open the service window for releasing the script project.
The window displays the history of released test script versions indicating version number, date, user name and a description.
To release a script project (.lsproj file), proceed as follows:
-
Right-click on the .lsproj file in the Project Explorer to open the context menu
-
Click on Open
-
Click on New Version in the service window of the script project.
-
Enter a short, meaningful description and a new version number in the dialogue and confirm with OK.
Only released script projects (.lsproj file) can be executed by the default user. |
Search in the Project Explorer
In the Project Explorer, you can filter for files, classes and functions in a script project.
Options
Storage path of the script project
By default, the script files are stored within the LisRT folder structure at LisRT\Workspace\Script\. You can change path in the main menu at
.Options in the Python Editor
The Python editor can be configured in the main menu at
.Feedback
Was this page helpful?
Glad to hear it! If you have any suggestions for improvement write to us.
Sorry to hear that. Please tell us what we can improve.