VXT file parsing

CANoe demo of which has a Gateway Tester. (I wonder, not a CAPL and .net support, why should put forward a XML, it seems Vector's also chaos ah)

First look at the VXT file. Open is actually a xml file. The xml file is generated by VBA.

The root element is testmodule, checked Canoe described as follows:

  testmodule is a test sequence for testing the control unit and the network through a specific test functions. It can be used to verify the various development steps, checking and regression model validation, and integration testing.

  testmodule through Test Automation Editor (do not know where this stuff) to edit, and run the simulation and Canoe Test setup.

  testmodule xml format includes a set of pre-test parameterizable available functions and control functions. CAPL test formats it may comprise a function test or .net format.

  testmodule xml format includes:

  Any number of test cases may be combined into a test group

  Syntax:  

<testmodule title="Title of test module " version="1.0" xmlns="Namespace of test module (as html)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Namespace with assigned schema-file">

</testmodule>

  

In which the title and version are necessary attributes.

ENGINEER, testsetup, SUT nothing to say. . . .

conditions are described below:

  constraints and conditions are performed when a test condition is when the synchronization check. These conditions are described in the test group or a test module or test case in detail.

Syntax:

<conditions>
  List of test conditions
</conditions>

requestresponsecheck, canoe described below:

  The inspection, monitoring is message-oriented, but not used simul

  This check is used to verify the treatment time, a signal is converted from one message to another message how long.

    In the case of time for checking, prior to a response message must be sent out is reached

    For checking for the worth case, the physical response message signal values ​​will be checked against the physical signal value or a constant value request message.

      

  Available in two configurations:

    The first configuration = Yes One2One , each request allows only one response, all the other check failed response will result. At the beginning of the request is ignored and the corresponding messages are inspected, the time interval is the shortest timeout is ignored and the time of the first route.

    The first configuration one2one = NO, in response to each request allows multiple, but additional data consistency monitoring response, these messages must also satisfy the content of the response condition contents inside. If you do not achieve data consistency check will fail. Data consistency interval from a first time by a route or time out.

      

  In this check the <response> section, only <signal> and <byte> attribute can be used, <signalref> and <byteref> property may be used. They references directly related to the request message.

  For an element <signalref> value can also be specified even if it is not rooted.

  When using <mostmsg> a <response> parameter, <param> can be described for use with the message content <byte>.

  

<requestresponsecheck title="..." mintime="..." timeout="..." observetime="..." one2one="yes|no">
  <request>
  Definition of the trigger message
    <canmsg/>
    or
    <linframe/>
    or
    <mostmsg/>
    or
    <frframe/>
    or
   <frpdu/>
  </request>
  <response>
  Definition of the independent message
  It is possible to refer to the trigger message
    <canmsg/>
    or
    <linframe/>
    or
    <mostmsg/>
    or
    <frframe/>
    or
   <frpdu/>
  </response>
</requestresponsecheck>

  Above defines a standard test. Here is the test case:

  <Testcase> contains the actual test execution instruction

  Using the syntax: title and ident is a must

<testcase ident=" ID of the test case, e.g. number " title="Title of test case" version="1.0" variants="A" >
</testcase>

  <Initialize> contains a series of assigned CAN signals, they are sent to the bus go. The second step, there will be a specified waiting time. This waiting period allows the system to "input", so that the system will be the actual value desired change.

   Using the syntax:

<initialize title="Headline for the primitive, visible in report" wait="Wait time in ms"> List of CAN signals/messages, LIN signals, FlexRay signals MOST messages and environment/system variables
</initialize>

  Again detail about cansignal, byte, used to define the signal signal.

  

<cansignal name="Signal name" msg="Message name" node="Node name" bus="Bus name">Value</cansignal>
<byte pos="Byte position from 0">Value</byte>

 

 

 

 

 

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generated from Excel -->
<!--Vector Test Automation Editor 1.1.55.0-->
<testmodule title="Gateway Tester" version="" xmlns="http://www.vector-informatik.de/CANoe/TestModule/1.16">
  <engineer>
    <info>
      <name>Name</name>
      <description>vislke</description>
    </info>
  </engineer>
  <testsetup>
    <info>
      <name>Version of test configuration</name>
      <description>1.2</description>
    </info>
    <info>
      <name>Test configuration created by</name>
      <description>Stefan</description>
    </info>
  </testsetup>
  <sut>
    <info>
      <name>ECU name</name>
      <description>Gateway</description>
    </info>
    <info>
      <name>ECU version</name>
      <description>0.99</description>
    </info>
  </sut>
  <conditions>
    <!-- relates to line # 8 in the excel file -->
    <requestresponsecheck timeout=" 1000ms" mintime="100us">
      <request>
        <canmsg id="ABSdata" bus="Engine" />
      </request>
      <response>
        <canmsg id="EngineInfo" bus="Comfort">
          <signalref name="Comf_CarSpeed" refname="CarSpeed" />
        </canmsg>
      </response>
    </requestresponsecheck>
    <!-- relates to line # 9 in the excel file -->
    <requestresponsecheck timeout=" 1000ms" mintime="100us">
      <request>
        <canmsg id="ABSdata" bus="Engine" />
      </request>
      <response>
        <canmsg id="EngineInfo" bus="Comfort">
          <signalref name="Comf_GearLock" refname="Gear_Lock" />
        </canmsg>
      </response>
    </requestresponsecheck>
    <!-- relates to line # 10 in the excel file -->
    <requestresponsecheck timeout=" 1000ms" mintime="100us">
      <request>
        <canmsg id="EngineData" bus="Engine" />
      </request>
      <response>
        <canmsg id="EngineInfo" bus="Comfort">
          <signalref name="Comf_EngSpeed" refname="EngineSpeed" />
        </canmsg>
      </response>
    </requestresponsecheck>
    <!-- relates to line # 11 in the excel file -->
    <requestresponsecheck timeout=" 1000ms" mintime="100us">
      <request>
        <canmsg id="EngineData" bus="Engine" />
      </request>
      <response>
        <canmsg id="EngineInfo" bus="Comfort">
          <signalref name="Comf_EngTemp" refname="EngineTemp" />
        </canmsg>
      </response>
    </requestresponsecheck>
    <!-- relates to line # 12 in the excel file -->
    <requestresponsecheck timeout=" 1000ms" mintime="100us">
      <request>
        <canmsg id="GearBoxInfo" bus="Engine" />
      </request>
      <response>
        <canmsg id="EngineInfo" bus="Comfort">
          <signalref name="Comf_Gear" refname="GearBox" />
        </canmsg>
      </response>
    </requestresponsecheck>
    <!-- relates to line # 13 in the excel file -->
    <requestresponsecheck timeout=" 2000us" mintime="100us">
      <request>
        <canmsg id="IgnitionInfo" bus="Comfort" />
      </request>
      <response>
        <canmsg id="Ignition_key" bus="Engine">
          <byteref pos=" 0" refpos=" 0" />
        </canmsg>
      </response>
    </requestresponsecheck>
    <!-- relates to line # 14 in the excel file -->
    <requestresponsecheck timeout=" 1000ms" mintime="100us">
      <request>
        <canmsg id="LSeat_Sensoric" bus="Comfort" />
      </request>
      <response>
        <canmsg id="ComfortStatus" bus="Engine">
          <signalref name="DriverDetect" refname="Comf_DriverDetection" />
        </canmsg>
      </response>
    </requestresponsecheck>
    <!-- relates to line # 15 in the excel file -->
    <requestresponsecheck timeout=" 1000ms" mintime="100us">
      <request>
        <canmsg id="RSeat_Sensoric" bus="Comfort" />
      </request>
      <response>
        <canmsg id="ComfortStatus" bus="Engine">
          <signalref name="PassengerDetect" refname="Comf_PassengerDetection" />
        </canmsg>
      </response>
    </requestresponsecheck>
  </conditions>
  <!-- This gateway checks can be used either in an isolated configuration (the test stimulates)
       or within a setup where an extra stimulation is not needed, because other
       ECUs are sending the stimulation messages.
       This can be controlled within the generation dialog. -->
  <!-- Stimulation by the test case has been selected during generation -->
  <!-- Start: The test cases itself -->
  <testcase title="Stimulate values for signal CarSpeed" ident="">
    <initialize title="" wait=" 3000ms">
      <cansignal name="CarSpeed" msg="ABSdata" bus="Engine">0</cansignal>
    </initialize>
    <initialize title="" wait=" 3000ms">
      <cansignal name="CarSpeed" msg="ABSdata" bus="Engine">255</cansignal>
    </initialize>
  </testcase>
  <testcase title="Stimulate values for signal Gear_Lock" ident="">
    <initialize title="" wait=" 3000ms">
      <cansignal name="Gear_Lock" msg="ABSdata" bus="Engine">1</cansignal>
    </initialize>
    <initialize title="" wait=" 3000ms">
      <cansignal name="Gear_Lock" msg="ABSdata" bus="Engine">2</cansignal>
    </initialize>
  </testcase>
  <testcase title="Stimulate values for signal EngineSpeed" ident="">
    <initialize title="" wait=" 3000ms">
      <cansignal name="EngineSpeed" msg="EngineData" bus="Engine">0</cansignal>
    </initialize>
    <initialize title="" wait=" 3000ms">
      <cansignal name="EngineSpeed" msg="EngineData" bus="Engine">8000</cansignal>
    </initialize>
  </testcase>
  <testcase title="Stimulate values for signal EngineTemp" ident="">
    <initialize title="" wait=" 3000ms">
      <cansignal name="EngineTemp" msg="EngineData" bus="Engine">-50</cansignal>
    </initialize>
    <initialize title="" wait=" 3000ms">
      <cansignal name="EngineTemp" msg="EngineData" bus="Engine">150</cansignal>
    </initialize>
  </testcase>
  <testcase title="Stimulate values for signal GearBox" ident="">
    <initialize title="" wait=" 3000ms">
      <cansignal name="GearBox" msg="GearBoxInfo" bus="Engine">0</cansignal>
    </initialize>
    <initialize title="" wait=" 3000ms">
      <cansignal name="GearBox" msg="GearBoxInfo" bus="Engine">8</cansignal>
    </initialize>
  </testcase>
  <testcase title="Stimulate values for message Ignition" ident="">
    <initialize title="" wait=" 6000us">
      <canmsg id="IgnitionInfo" bus="Comfort">
        <byte pos=" 0 ">0x12</byte>
      </canmsg>
    </initialize>
  </testcase>
  <testcase title="Stimulate values for signal Comf_DriverDetection" ident="">
    <initialize title="" wait=" 3000ms">
      <cansignal name="Comf_DriverDetection" msg="LSeat_Sensoric" bus="Comfort">0</cansignal>
    </initialize>
    <initialize title="" wait=" 3000ms">
      <cansignal name="Comf_DriverDetection" msg="LSeat_Sensoric" bus="Comfort">5</cansignal>
    </initialize>
  </testcase>
  <testcase title="Stimulate values for signal Comf_PassengerDetection" ident="">
    <initialize title="" wait=" 3000ms">
      <cansignal name="Comf_PassengerDetection" msg="RSeat_Sensoric" bus="Comfort">0</cansignal>
    </initialize>
    <initialize title="" wait=" 3000ms">
      <cansignal name="Comf_PassengerDetection" msg="RSeat_Sensoric" bus="Comfort">5</cansignal>
    </initialize>
  </testcase>
  <testcase title="Wait for 10 more seconds after the stimulation and purely observe" ident="">
    <untilend title="" wait="10s" />
  </testcase>
  <!-- End: The test cases itself -->
</testmodule>

  

 

 

Guess you like

Origin www.cnblogs.com/ichbinhere/p/11681313.html