Python is said to be a high level,
Object oriented programing language. Guido Van Rossum created the Python and the
design of this program was started in the late 1980s but was released first in
1991. It was developed with the aim to use as an interpreted language. An
interpreted language is high-level programing language, which can run and
executed by an interpreter, but the processing of the program takes a longer
time. Features of Python programing is simpler and easier to learn since syntax
is easily understandable. Python is free and open source language for
commercial use. Python programs can run on various OS platforms without making
any considerable changes and pieces of
other language programs can also combine easily with it. Python provides substantial
number of standard libraries so that programmer need not to write all the codes
by himself. Since python is object oriented program, Programmer can divide
complex problems into smaller sets by creating objects. Some of its wide range
of applications are Web Applications, Numeric and Scientific
Prototypes creating, System Testing and so on.
Python test script template to test various
Camera Based Driver Assistance System functions is as follows:
1. Importing the standard and user created
libraries: In this step, all necessary test libraries are going to be imported
to proceed the scripting without any errors.
2. Header Section: Which involves the Description,
Objective of the Test Requirements, Doors Id, Requirements Id, and Test
Priority. These parameters will be linked with Doors
3. Precondition: Precondition phase will begin with
restarting the Canoe data acquisition and then starting Canoe measurement. Once
Canoe has started, the next step of the precondition is opening the VLC media
player and loading the required video to test the requirements followed by initializing
the camera that is to be tested. Camera initialization will be done with the
help of switching power cycle and Ignition cycle that can set the camera to
vision mode. To probe if the camera turned to vision mode, a diagnostic request
is sent from Python to Canoe and its diagnostic response is checked. Diagnostics
concept will be explained in detail in the section xxx. Last step of the
precondition phase is setting the required input signals.
4. Test Execution: In the test execution phase,
first the required system module that must be tested is made active by setting
the appropriate input signal to relevant value and then evaluated whether the
system module is active or not. Once the module that needs to be tested is
active, the video, which has loaded in precondition phase, is going to play.
Once the video starts playing, the response of the camera detection will be
tested by checking the relevant output signals for the required output values.
And the last step of the test execution phase is verifying and logging the
result of the test case for its success or failure.
5. End Condition: This is the last phase of the
test case template Where Canoe logging will be stopped, and end condition is
logged into Doors.