Anonymous_User Absent Member.
Absent Member.
462 views

ECMAScript testing in Designer

Ok, maybe I'm being dense here, but has anybody figured out how the
expression tester pane in the ECMAScript editor works?


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.netiq.com

Please post questions in the forums. No support provided via email.
If you find this post helpful, please click on the star below.
Labels (1)
0 Likes
7 Replies
Anonymous_User Absent Member.
Absent Member.

Re: ECMAScript testing in Designer

David Gersic wrote:

> Ok, maybe I'm being dense here, but has anybody figured out how the
> expression tester pane in the ECMAScript editor works?


Give me a an example where it doesn't work?

When I have an ecmascript open with various functions, I can call a
specific function from the expression tester.

One can also execute arbitrary ecmascript.

--
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Knowledge Partner
Knowledge Partner

Re: ECMAScript testing in Designer

On 2/11/2014 9:42 AM, Alex McHugh wrote:
> David Gersic wrote:
>
>> Ok, maybe I'm being dense here, but has anybody figured out how the
>> expression tester pane in the ECMAScript editor works?

>
> Give me a an example where it doesn't work?
>
> When I have an ecmascript open with various functions, I can call a
> specific function from the expression tester.
>
> One can also execute arbitrary ecmascript.


How do you echo back content to the console? I.e. Beyond returning a
value, write back a message?


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: ECMAScript testing in Designer

Geoffrey Carman wrote:

> How do you echo back content to the console? I.e. Beyond returning a
> value, write back a message?


Yes, that is a good question. It's been a while since I played with
this. Ì recall I used some sort of write to dstrace/IDM trace function
when I wanted to log messages. But that won't work in this particular
context.What are you trying to do?

--
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Knowledge Partner
Knowledge Partner

Re: ECMAScript testing in Designer

On 2/11/2014 10:20 AM, Alex McHugh wrote:
> Geoffrey Carman wrote:
>
>> How do you echo back content to the console? I.e. Beyond returning a
>> value, write back a message?

>
> Yes, that is a good question. It's been a while since I played with
> this. Ì recall I used some sort of write to dstrace/IDM trace function
> when I wanted to log messages. But that won't work in this particular
> context.What are you trying to do?


Testing, needed to put some debug steps in, to see how far I got, never
could quite figure out how trace to the console.


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: ECMAScript testing in Designer

On Tue, 11 Feb 2014 14:42:59 +0000, Alex McHugh wrote:

> David Gersic wrote:
>
>> Ok, maybe I'm being dense here, but has anybody figured out how the
>> expression tester pane in the ECMAScript editor works?

>
> Give me a an example where it doesn't work?


This is a fundamental stupid-user level "it doesn't work" question. I
have the editor open. I have some ECMAScript with a couple of functions
in it. I have the lower pane that looks like:

>


so what the heck do I put there to test something? It seems like if I
have a function "test(s)" defined in the ECMAScript, I should be able to
test it with something like:

>test("string goes here")


which prints the not very helpful message:

Error Evaluating Script
com.novell.soa.script.mozilla.javascript.EcmaError: ReferenceError:
"test" is not defined.


> When I have an ecmascript open with various functions, I can call a
> specific function from the expression tester.


How? Literally, how?


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.netiq.com

Please post questions in the forums. No support provided via email.
If you find this post helpful, please click on the star below.
0 Likes
Knowledge Partner
Knowledge Partner

Re: ECMAScript testing in Designer

On 2/11/2014 10:30 AM, David Gersic wrote:
> On Tue, 11 Feb 2014 14:42:59 +0000, Alex McHugh wrote:
>
>> David Gersic wrote:
>>
>>> Ok, maybe I'm being dense here, but has anybody figured out how the
>>> expression tester pane in the ECMAScript editor works?

>>
>> Give me a an example where it doesn't work?

>
> This is a fundamental stupid-user level "it doesn't work" question. I
> have the editor open. I have some ECMAScript with a couple of functions
> in it. I have the lower pane that looks like:
>
> >

>
> so what the heck do I put there to test something? It seems like if I
> have a function "test(s)" defined in the ECMAScript, I should be able to
> test it with something like:
>
>> test("string goes here")



If you expect a literal string, that should work. Maybe a trailing
semicolon.

If you need an object, a vector, or some other object type, it is hard
to 'type' them in the GUI. In which case, you probably need a test
function to build the right input data to call...



> which prints the not very helpful message:
>
> Error Evaluating Script
> com.novell.soa.script.mozilla.javascript.EcmaError: ReferenceError:
> "test" is not defined.
>
>
>> When I have an ecmascript open with various functions, I can call a
>> specific function from the expression tester.

>
> How? Literally, how?
>
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: ECMAScript testing in Designer

On Tue, 11 Feb 2014 15:39:15 +0000, Geoffrey Carman wrote:

> On 2/11/2014 10:30 AM, David Gersic wrote:
>> On Tue, 11 Feb 2014 14:42:59 +0000, Alex McHugh wrote:
>>
>>> David Gersic wrote:
>>>
>>>> Ok, maybe I'm being dense here, but has anybody figured out how the
>>>> expression tester pane in the ECMAScript editor works?
>>>
>>> Give me a an example where it doesn't work?

>>
>> This is a fundamental stupid-user level "it doesn't work" question. I
>> have the editor open. I have some ECMAScript with a couple of functions
>> in it. I have the lower pane that looks like:
>>
>>
>> >

>> so what the heck do I put there to test something? It seems like if I
>> have a function "test(s)" defined in the ECMAScript, I should be able
>> to test it with something like:
>>
>>> test("string goes here")

>
>
> If you expect a literal string, that should work.


And, now, it does. I'm sure that yesterday, it did not. I tested it again
this morning, and it did not. Now, it does. I'm mystified.


> If you need an object, a vector, or some other object type, it is hard
> to 'type' them in the GUI. In which case, you probably need a test
> function to build the right input data to call...


Yeah, ok, I can see that it might be difficult to represent an object or
vector in a simple CLI tester. All I wanted was a simple string return.


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.netiq.com

Please post questions in the forums. No support provided via email.
If you find this post helpful, please click on the star below.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.