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

TOPIC: [info]: TTCN3 test case selection by keywords?

[info]: TTCN3 test case selection by keywords? 25 May 2004 13:54 #6675

Dear Antal,

you call (i.e. execute) testcases within the control part using the
keyword "execute", e.g.

var verdict myVerdict := execute(MyTestCase_1(), 5.0) ;

This statement would call the testcase MyTestCase_1() with a timing
guard of 5.0 seconds. The return value (always a verdict) will be stored
in myVerdict.

Unfortunately you can no call arbitrary string as test cases identifiers.

But what is quite frequently being done is to group the execution of
test cases within a function. For example:

function group1() return verdict {
var verdict myVerdict ;
myVerdict := execute(T1()) ;
if( myVerdict != pass) { return myVerdict ; }
myVerdict := execute(T2()) ;
if( myVerdict != pass) { return myVerdict ; }
// ...
}

Then within the control part you can call this function based on a
logical decision, e.g.

control {
if(MyModulePar == true) {
group1() ;
} else {
group2() ;
}

// ...
}

Does this answer a little bit your question ?

Best regards,

Theo


Antal Fazakas wrote:

> Hi Everybody,
>
> I'm interested in TTCN3 control part study. There is some test case
> selection mechanisms based on keywords for example? I found some
> info, but only general references in this area. Can I find a detailed
> description, or/and some test examples about it?
>
> Thanks for your help,
>
> Best regards,
>
> Antal Fazakas Software Engineer Nokia-TP-MSW/Budapest Phone:
> +36209849 834 Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
>
>
>
>
>
>
>
>
>
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 Theofanis Vassiliou-Gioles Sent: May 20,2004 17:03 To:
> This email address is being protected from spambots. You need JavaScript enabled to view it. Subject: Re: Function Parameterization and Arrays
>
>
>
> Hi Jason,
>
> a quick answer: Instead of using arrays try using "record of"
> constructs. This should solve your problem. "Record of" are
> equivalent to arrays. There you do not have to fix the length!
>
> I try to compile a small useful example. But in the meantime I hope
> this points you into the right direction.
>
> Best regards,
>
> Theo
>
> Jason Capstick wrote:
>
>
>> Hi,
>>
>> There is some confusion here as to whether the TTCN-3 language
>> allows arrays to be passed as parameters to functions. The spec
>> does not explicitly rule out arrays as parameters. Example:
>> function ArrayTestFunction(in integer arrayX) { ... }
>>
>> ...
>>
>> var integer arrayX[10]; ArrayTestFunction(arrayX);
>>
>> The only way I see to do it is via a subtype with an arrayDef. This
>> however fixes the size of the passed array. Example: type integer
>> IntegerArray10[10] function ArrayTestFunction(in IntegerArray10
>> arrayX)......
>>
>>
>> Does the type matching allow the following?: type integer
>> IntegerArray10[10] function ArrayTestFunction(in IntegerArray10
>> arrayX) { ... }
>>
>> ... var integer arrayX[5]; ArrayTestFunction(arrayX);
>>
>> Could someone please clarify this?. Are there any future changes to
>> the way this is works to work?
>>
>> Thanks Jas
>>
>>
>>
********************************************************************************
*********************************************
>> The information contained in this email and any attachments is
>> likely to be confidential and legally privileged, and is for the
>> intended recipient named above only. Any copying, dissemination,
>> disclosure of or use of this email or its attachments unless
>> authorised by us is prohibited, except that you may forward this
>> email and/or attachments to a third party on a strict "need to
>> know" basis. If you have received this email in error, please
>> notify us immediately by forwarding the email to
>> This email address is being protected from spambots. You need JavaScript enabled to view it.. Please then delete this email and any full or
>> partial copies of it. You as the intended recipient must be aware
>> and accept that email is not a totally secure communications
>> medium. Although we have taken all reasonable steps to make sure
>> this email and any attachments are free from viruses, we do not (to
>> the extent permitted by law) accept any liability whatsoever for
>> any virus infection and/or compromise of security caused by this
>> email and any attachment. No contract may be formed or documents
>> served by you on or with us by this email or any attachments unless
>> expressly agreed otherwise by us. Any views expressed in this email
>> or attachments by an individual are not necessarily those of any
>> UbiNetics company.
>>
>
>
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin