Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: tciStartTestCase parameters

tciStartTestCase parameters 02 Aug 2007 10:07 #7177

Hi,

I need to start a testCase execution with tciStartTestCase function but I am
not sure of how to fill all data in the parameters list.

Going through the TCI standard document we found the
tciGetTestCaseParameters function returns a TciParameterTypeListType
(documentation says it is a list of TciParameterTypeType, being
TciParameterTypeType a structure of Type and TciParameterPassingModeType).

We intended to use this function to obtain the list of parameters for the
test and use the passing mode to set the respective value in the
TciParamterListType required in tciStartTestCase function.

We are confused because the ANSI C representation of
TciParameterTypeListType is:
typedef struct TciParameterTypeListType
{
long int length;
TciType *parList;
} TciParameterTypeListType;

How can we actually fill each TciParameterType to call tciStartTestCase
function?

Thank you very much,

Vanessa
The administrator has disabled public write access.

tciStartTestCase parameters 06 Aug 2007 06:56 #7178

Hello Vanessa,

From the function tciGetTestCaseParameters you should be able to obtain
the type and passing mode of each parameter. What you still need is the
name of each parameter as this seems to be needed in the parameters used
in tciStartTestCase. I have to say that I do not know myself how you
could obtain this information through the tci Interface. Maybe I miss
something.

Alternatively, you could extract this information from the TTCN-3 code,
store it into a file, and read this file by your test management
implementation. There are the typical pros and cons: No need for such
self-reflective features of the test executable vs. an additional file
that has to be uptodate.

I hope this helps you further.

Best regards

Thomas

>
Original Message
>From: active_ttcn3 : mts stf133 ttcn version 3 - active
>members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of ext
>SUBSCRIBE TTCN3 Anonymous
>Sent: Thursday, 02. August 2007 12:07
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: tciStartTestCase parameters
>
>Hi,
>
>I need to start a testCase execution with tciStartTestCase
>function but I= am not sure of how to fill all data in the
>parameters list.
>
>Going through the TCI standard document we found the
>tciGetTestCaseParameters function returns a
>TciParameterTypeListType (documentation says it is a list of
>TciParameterTypeType, being TciParameterTypeType a structure
>of Type and TciParameterPassingModeType)= .
>
>We intended to use this function to obtain the list of
>parameters for the=
>
>test and use the passing mode to set the respective value in
>the TciParamterListType required in tciStartTestCase function.
>
>We are confused because the ANSI C representation of
>TciParameterTypeListType is:
>typedef struct TciParameterTypeListType
>{
> long int length;
> TciType *parList;
>} TciParameterTypeListType;
>
>How can we actually fill each TciParameterType to call
>tciStartTestCase function?
>
>Thank you very much,
>
>Vanessa
>
The administrator has disabled public write access.

tciStartTestCase parameters 07 Aug 2007 16:40 #7179

Hi..


Thanks for the reply, Thomas :)

I agree we should be able to obtain the parameters passing mode as well as
the type from the tciGetTestCaseParameters function, according to the
standard, the TciParameterTypeListType should be a list of
TciParameterTypeType (containing type + passing mode)

but its ANSI C mapping is:

>typedef struct TciParameterTypeListType
>{
> long int length;
> TciType *parList;
>} TciParameterTypeListType;

I
So I don't seem to be able to get the passing mode from it. Maybe I am not
getting something.

About the name of each parameter, we had understood it is not needed to
start the test case; our idea was to get the parameters list with
tciGetTestParameters(which retrieves the list in the order they have to be
passed to the tciStartTestCase function), and feed the TciParametersListType
in the very same order, with the value + passing mode, and call the
tciStartTestCase with this list.

Kind regards,

Vanessa




On Mon, 6 Aug 2007 08:56:58 +0200, Thomas Deiss <This email address is being protected from spambots. You need JavaScript enabled to view it.> wrote:

>Hello Vanessa,
>
>From the function tciGetTestCaseParameters you should be able to obtain
>the type and passing mode of each parameter. What you still need is the
>name of each parameter as this seems to be needed in the parameters used
>in tciStartTestCase. I have to say that I do not know myself how you
>could obtain this information through the tci Interface. Maybe I miss
>something.
>
>Alternatively, you could extract this information from the TTCN-3 code,
>store it into a file, and read this file by your test management
>implementation. There are the typical pros and cons: No need for such
>self-reflective features of the test executable vs. an additional file
>that has to be uptodate.
>
>I hope this helps you further.
>
>Best regards
>
>Thomas
>
>>
Original Message
>>From: active_ttcn3 : mts stf133 ttcn version 3 - active
>>members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of ext
>>SUBSCRIBE TTCN3 Anonymous
>>Sent: Thursday, 02. August 2007 12:07
>>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>>Subject: tciStartTestCase parameters
>>
>>Hi,
>>
>>I need to start a testCase execution with tciStartTestCase
>>function but I= am not sure of how to fill all data in the
>>parameters list.
>>
>>Going through the TCI standard document we found the
>>tciGetTestCaseParameters function returns a
>>TciParameterTypeListType (documentation says it is a list of
>>TciParameterTypeType, being TciParameterTypeType a structure
>>of Type and TciParameterPassingModeType)= .
>>
>>We intended to use this function to obtain the list of
>>parameters for the=
>>
>>test and use the passing mode to set the respective value in
>>the TciParamterListType required in tciStartTestCase function.
>>
>>We are confused because the ANSI C representation of
>>TciParameterTypeListType is:
>>typedef struct TciParameterTypeListType
>>{
>> long int length;
>> TciType *parList;
>>} TciParameterTypeListType;
>>
>>How can we actually fill each TciParameterType to call
>>tciStartTestCase function?
>>
>>Thank you very much,
>>
>>Vanessa
>>
The administrator has disabled public write access.

tciStartTestCase parameters 08 Aug 2007 09:05 #7182

Hi Vanessa,

In my opinion you made a valid observation that it should be possible to obtain parameter passing modes in addition to parameter types and that the current C API does not allow doing in general ways. Only after a test case is started, a user-implemented callback tciTestCaseStarted() gets it in its list of formal parameters for that particular test case, but you can't get it for an arbitrary test case and you can't get it before a test case is started.

The existing C API function for parameter introspection has the following signature:

TciParameterTypeListType
tciGetTestCaseParameters
(in TciTestCaseIdType testCaseId);

It could be also convenient if the end user gets names of test case parameters in addition to parameter passing modes. While this is not absolutely necessary to run test cases, this would add user friendliness to the TCI-TM API.

I would propose adding a new TCI-TM function for test case parameter list introspection while keeping the existing one intact. It could look like that in C mapping:

TciParameterListType
tciGetTestCaseParameterList
(in TciTestCaseIdType testCaseId)

In C mapping, TciParameterListType is defined as an array of TciParameterType elements, and as of V3.2.1, TciParameterType is defined as follows:

typedef struct TciParameterType
{
String parName;
TciParameterPassingModeType parPassMode;
TciValue parValue;
}
TciParameterType;

So it can fit parameter name, parameter passing mode, and parValue field could be omitted but its type could still be retrieved using tciGetType(parValue) function call.

Best regards,
Alexey

Vanessa Ibanez <This email address is being protected from spambots. You need JavaScript enabled to view it.> wrote: Hi..


Thanks for the reply, Thomas :)

I agree we should be able to obtain the parameters passing mode as well as
the type from the tciGetTestCaseParameters function, according to the
standard, the TciParameterTypeListType should be a list of
TciParameterTypeType (containing type + passing mode)

but its ANSI C mapping is:

>typedef struct TciParameterTypeListType
>{
> long int length;
> TciType *parList;
>} TciParameterTypeListType;

I
So I don't seem to be able to get the passing mode from it. Maybe I am not
getting something.

About the name of each parameter, we had understood it is not needed to
start the test case; our idea was to get the parameters list with
tciGetTestParameters(which retrieves the list in the order they have to be
passed to the tciStartTestCase function), and feed the TciParametersListType
in the very same order, with the value + passing mode, and call the
tciStartTestCase with this list.

Kind regards,

Vanessa




On Mon, 6 Aug 2007 08:56:58 +0200, Thomas Deiss wrote:

>Hello Vanessa,
>
>From the function tciGetTestCaseParameters you should be able to obtain
>the type and passing mode of each parameter. What you still need is the
>name of each parameter as this seems to be needed in the parameters used
>in tciStartTestCase. I have to say that I do not know myself how you
>could obtain this information through the tci Interface. Maybe I miss
>something.
>
>Alternatively, you could extract this information from the TTCN-3 code,
>store it into a file, and read this file by your test management
>implementation. There are the typical pros and cons: No need for such
>self-reflective features of the test executable vs. an additional file
>that has to be uptodate.
>
>I hope this helps you further.
>
>Best regards
>
>Thomas
>
>>
Original Message
>>From: active_ttcn3 : mts stf133 ttcn version 3 - active
>>members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of ext
>>SUBSCRIBE TTCN3 Anonymous
>>Sent: Thursday, 02. August 2007 12:07
>>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>>Subject: tciStartTestCase parameters
>>
>>Hi,
>>
>>I need to start a testCase execution with tciStartTestCase
>>function but I= am not sure of how to fill all data in the
>>parameters list.
>>
>>Going through the TCI standard document we found the
>>tciGetTestCaseParameters function returns a
>>TciParameterTypeListType (documentation says it is a list of
>>TciParameterTypeType, being TciParameterTypeType a structure
>>of Type and TciParameterPassingModeType)= .
>>
>>We intended to use this function to obtain the list of
>>parameters for the=
>>
>>test and use the passing mode to set the respective value in
>>the TciParamterListType required in tciStartTestCase function.
>>
>>We are confused because the ANSI C representation of
>>TciParameterTypeListType is:
>>typedef struct TciParameterTypeListType
>>{
>> long int length;
>> TciType *parList;
>>} TciParameterTypeListType;
>>
>>How can we actually fill each TciParameterType to call
>>tciStartTestCase function?
>>
>>Thank you very much,
>>
>>Vanessa
>>
The administrator has disabled public write access.

tciStartTestCase parameters 09 Aug 2007 04:07 #7183

  • Haris M
  • Haris M's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
can you change my address to This email address is being protected from spambots. You need JavaScript enabled to view it.

haris



> Hi Vanessa,
>
> In my opinion you made a valid observation that it should be possible to
> obtain parameter passing modes in addition to parameter types and that the
> current C API does not allow doing in general ways. Only after a test case
> is started, a user-implemented callback tciTestCaseStarted() gets it in
> its list of formal parameters for that particular test case, but you can't
> get it for an arbitrary test case and you can't get it before a test case
> is started.
>
> The existing C API function for parameter introspection has the following
> signature:
>
> TciParameterTypeListType
> tciGetTestCaseParameters
> (in TciTestCaseIdType testCaseId);
>
> It could be also convenient if the end user gets names of test case
> parameters in addition to parameter passing modes. While this is not
> absolutely necessary to run test cases, this would add user friendliness
> to the TCI-TM API.
>
> I would propose adding a new TCI-TM function for test case parameter list
> introspection while keeping the existing one intact. It could look like
> that in C mapping:
>
> TciParameterListType
> tciGetTestCaseParameterList
> (in TciTestCaseIdType testCaseId)
>
> In C mapping, TciParameterListType is defined as an array of
> TciParameterType elements, and as of V3.2.1, TciParameterType is defined
> as follows:
>
> typedef struct TciParameterType
> {
> String parName;
> TciParameterPassingModeType parPassMode;
> TciValue parValue;
> }
> TciParameterType;
>
> So it can fit parameter name, parameter passing mode, and parValue field
> could be omitted but its type could still be retrieved using
> tciGetType(parValue) function call.
>
> Best regards,
> Alexey
>
> Vanessa Ibanez <This email address is being protected from spambots. You need JavaScript enabled to view it.> wrote: Hi..
>
>
> Thanks for the reply, Thomas :)
>
> I agree we should be able to obtain the parameters passing mode as well as
> the type from the tciGetTestCaseParameters function, according to the
> standard, the TciParameterTypeListType should be a list of
> TciParameterTypeType (containing type + passing mode)
>
> but its ANSI C mapping is:
>
>>typedef struct TciParameterTypeListType
>>{
>> long int length;
>> TciType *parList;
>>} TciParameterTypeListType;
>
> I
> So I don't seem to be able to get the passing mode from it. Maybe I am not
> getting something.
>
> About the name of each parameter, we had understood it is not needed to
> start the test case; our idea was to get the parameters list with
> tciGetTestParameters(which retrieves the list in the order they have to be
> passed to the tciStartTestCase function), and feed the
> TciParametersListType
> in the very same order, with the value + passing mode, and call the
> tciStartTestCase with this list.
>
> Kind regards,
>
> Vanessa
>
>
>
>
> On Mon, 6 Aug 2007 08:56:58 +0200, Thomas Deiss wrote:
>
>>Hello Vanessa,
>>
>>From the function tciGetTestCaseParameters you should be able to obtain
>>the type and passing mode of each parameter. What you still need is the
>>name of each parameter as this seems to be needed in the parameters used
>>in tciStartTestCase. I have to say that I do not know myself how you
>>could obtain this information through the tci Interface. Maybe I miss
>>something.
>>
>>Alternatively, you could extract this information from the TTCN-3 code,
>>store it into a file, and read this file by your test management
>>implementation. There are the typical pros and cons: No need for such
>>self-reflective features of the test executable vs. an additional file
>>that has to be uptodate.
>>
>>I hope this helps you further.
>>
>>Best regards
>>
>>Thomas
>>
>>>
Original Message
>>>From: active_ttcn3 : mts stf133 ttcn version 3 - active
>>>members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of ext
>>>SUBSCRIBE TTCN3 Anonymous
>>>Sent: Thursday, 02. August 2007 12:07
>>>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>>>Subject: tciStartTestCase parameters
>>>
>>>Hi,
>>>
>>>I need to start a testCase execution with tciStartTestCase
>>>function but I= am not sure of how to fill all data in the
>>>parameters list.
>>>
>>>Going through the TCI standard document we found the
>>>tciGetTestCaseParameters function returns a
>>>TciParameterTypeListType (documentation says it is a list of
>>>TciParameterTypeType, being TciParameterTypeType a structure
>>>of Type and TciParameterPassingModeType)= .
>>>
>>>We intended to use this function to obtain the list of
>>>parameters for the=
>>>
>>>test and use the passing mode to set the respective value in
>>>the TciParamterListType required in tciStartTestCase function.
>>>
>>>We are confused because the ANSI C representation of
>>>TciParameterTypeListType is:
>>>typedef struct TciParameterTypeListType
>>>{
>>> long int length;
>>> TciType *parList;
>>>} TciParameterTypeListType;
>>>
>>>How can we actually fill each TciParameterType to call
>>>tciStartTestCase function?
>>>
>>>Thank you very much,
>>>
>>>Vanessa
>>>
>
>
>
>
>
> !DSPAM:289,46b986ef109091804284693!
>
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin