Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED] Use custom procedures in multiple test cases
[SOLVED] Use custom procedures in multiple test cases [message #1698525] Tue, 16 June 2015 09:05 Go to next message
Andreas Neuteich is currently offline Andreas NeuteichFriend
Messages: 4
Registered: April 2015
Junior Member
Hi all,

Since I need to do some stuff in multiple test cases, I would like to create some procedures and use those procedures in my test cases. I have some problems creating/using them, though.

First, is it correct to create the procedures in a *.test file? I would like to separate the procedures from the other test cases, so I've created a new folder (say "myproc") and created the procedures there.

Now, my second problem is that I cannot use those defined procedures in my other test cases. This is the error message that appears: "Scriptlet X not found at Y".

Simple example: I have two files, one for the procedure, one is my test case
/myproc/MyHelloWorldProcedure
/MyTestCase


MyHelloWorldProcedure:
proc "say-hello-world-procedure" {
  show-alert "Hello, you"
}


MyTestCase:
my-hello-world-procedure


Error Message that I got: Scriptlet MyHelloWorldProcedure not found at my-hello-world-procedure .

When I'm using the procedure in the same file in which it is defined (i.e. MyHelloWorldProcedure), it works. But in that case I need to define the same procedure in every test case that uses it? There is probably an easy solution to it, I'm just not seeing it.. Smile

Thanks,
Andreas

[Updated on: Mon, 05 October 2015 06:56] by Moderator

Report message to a moderator

Re: Use custom procedures in multiple test cases [message #1698528 is a reply to message #1698525] Tue, 16 June 2015 09:14 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Andreas,

You should use ECL Script Context for this purpose.
Just place your procedure in a Context and it will be available in a Test Cases which have this context added.
You can also add ECL Script Context with a procedure as a Default Context, so the procedure will be available for all test cases in a Project.

Kind regards,
Ulyana.

[Updated on: Tue, 16 June 2015 10:07]

Report message to a moderator

Re: Use custom procedures in multiple test cases [message #1698529 is a reply to message #1698528] Tue, 16 June 2015 09:21 Go to previous messageGo to next message
Andreas Neuteich is currently offline Andreas NeuteichFriend
Messages: 4
Registered: April 2015
Junior Member
Hi Ulyana,

Thanks for the rapid answer, works like a charm!
Re: Use custom procedures in multiple test cases [message #1698541 is a reply to message #1698529] Tue, 16 June 2015 10:10 Go to previous message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Andreas,

Happy to hear it Smile

Kind regards,
Ulyana.

Previous Topic:Stuck loading AUT
Next Topic:[SOLVED] how to get value of childcount to put on variable
Goto Forum:
  


Current Time: Tue Apr 16 12:26:09 GMT 2024

Powered by FUDForum. Page generated in 2.09828 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top