Configuration Desk
Configuration Desk
Topics
BusManagerAdvanced.zip
Python is an object oriented high level interpreted language that supports line based execution
for interactive usage
Supports auto completion and object inspection ( “.” or Ctrl + Space Space)
Python.exe (console) Interactive line based interpreter and debugger, e.g. PythonWin.exe
(windows application with editor and build in debugger) PyCharm, Eclipse, Visual Studio, ..
This is implemented via COM (Component Object Model) API
Example,
Project
Common Framework for Test Operation and Tools & Capability Development
Overview
An effort was made to write low level python libraries that communicate with Automation Desk and
create the test sequence. This spike covers the observations and workaround available to this
approach as Automation Desk does not support sequence creation through COM API's in the same
way as tools like National Instruments Teststand.
A demo was planned to run an existing test cases in LabCar through the robot framework
environment. The test case uses the LabCar NI test rig to execute the steps written in Automation
Desk. Steps planned in the tasks
2. Create a project
4. Create a Sequence
In the above approach step 6 was not possible, this was confirmed with dSPACE engineers during a
discussion and also the same question was raised during the Automation Desk overview demo.
Alternate approach suggested by dSPACE and other methods yet to be tried are listed below.
1. Using Generic Sequence - passing steps as dictionary element
One of the method suggested was to use generic steps that parses the values from a dictionary
variable, these dictionary variable should contain the steps for the test cases. As variables are
accessible and editable via COM APIs, they can be controlled by robot framework keyword libraries.
The steps in this method are shown below,
a. Serial Block - Executes the items in the block Serially (also it has the link to the Custom
Library)
ii. SetLibraryLink - Links the library element from a dictionary variable that
contains step names
The above steps executes for each element in the dictionary that contains the step names
The Sequence layout for every test case will look exactly same which makes debugging more
complex with the generated test sequences
Implementing the test case generation library from robot framework may be less complex as it
only has to pass the steps and variables to a local variable
Automation Desk UI showing keywords in Library and variables that are used to passed the steps as
string
Using XML file creation/manipulation approach
Automation Desk saves most of its files in xml formats as well. This can be used to create new
sequences that can be executed from Automation Desk. There is an XML template used for quiet a
long time in JLR. Currently working with this template at the moment, this section will be updated
soon ate the findings are mature
XML schema can not be expected to be consistent between different versions of Automation
desk, this could block updating test cases to new version of Automation Desk
Given the fact that XML structure is complex for test cases in Automation desk, creating or
editing them appears to be too complicated
One advantage is the availability of extensive packages in python for XML manipulation
An implementation of this approach was tried. The implementation of the python library is in
this Gitlab link.
This method creates a test case from the sequences in custom library and executes them. Also it can
import existing projects and execute them and collect the report.
Conclusion
Using a custom sequence for test case creation through Automation Desk API is the only feasible
solution as long as the blocks are accessible and editable using API. Please follow the readme.md in
the Gitlab link provided to get more details about the implementation.