testing scripts

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

testing scripts

Bowles, Mickey (RIC)
How do you guys test your beanshell script prior to using in an app?
*****************************************************
The Contents of this e-mail and any attachments to it may contain confidential and/or legally privileged information. This information is only for use by the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or taking action based upon the information contained herein is strictly prohibited. If this e-mail was received in error, please notify the sender and return the documents immediately.

************************************************************


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: testing scripts

David Lee
I use a "test mode" in my app for doing this.
The scripts cant run standalone because they depend on integrated things which only exist when running as part of my app, so I have a "test mode" which makes all side effects harmless ... for example, sending emails,
I have the "test mode" always send emails to my own test account, not a live customer account.
Then when its all working fine I turn off test mode.
 
I also have a "Validate" process which tries to validate the script. Its not 100% ... all it does is attempt to interpret the script and see if it succeeds.   I code my scripts so that intrepreting them should do nothing except define variables and functions.  That way I can "validate" the script without running it.
But that only goes so far ... beanshell being such a runtime typed scripting language can fail in ways that you cant always predict.
----- Original Message -----
Sent: Friday, November 07, 2008 1:56 PM
Subject: [Beanshell-users] testing scripts

How do you guys test your beanshell script prior to using in an app?
*****************************************************
The Contents of this e-mail and any attachments to it may contain confidential and/or legally privileged information. This information is only for use by the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or taking action based upon the information contained herein is strictly prohibited. If this e-mail was received in error, please notify the sender and return the documents immediately.

************************************************************


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: testing scripts

brewer
In reply to this post by Bowles, Mickey (RIC)
I start by using the BeanShell DeskTop if I can, which is most of the
time. (BeansShell DeskTop is executed by launching the bsh.jar.) I even
use it for testing Java classes during development. Very, very handy.

-Philip Lindsey
www.bbeans.biz

Bowles, Mickey (RIC) wrote:

> How do you guys test your beanshell script prior to using in an app?
> *****************************************************
> The Contents of this e-mail and any attachments to it may contain confidential and/or legally privileged information. This information is only for use by the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or taking action based upon the information contained herein is strictly prohibited. If this e-mail was received in error, please notify the sender and return the documents immediately.
>
> ************************************************************
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Beanshell-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/beanshell-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: testing scripts

Bowles, Mickey (RIC)

 Does this show compilation results?  What is your script needs classes
from the app that would call it in normal use?  Guess I need to fire up
Beanshell Desktop.


-----Original Message-----
From: brewer [mailto:[hidden email]]
Sent: Friday, November 07, 2008 3:27 PM
To: [hidden email]
Subject: Re: [Beanshell-users] testing scripts

I start by using the BeanShell DeskTop if I can, which is most of the
time. (BeansShell DeskTop is executed by launching the bsh.jar.) I even
use it for testing Java classes during development. Very, very handy.

-Philip Lindsey
www.bbeans.biz

Bowles, Mickey (RIC) wrote:
> How do you guys test your beanshell script prior to using in an app?
> *****************************************************
> The Contents of this e-mail and any attachments to it may contain
confidential and/or legally privileged information. This information is
only for use by the intended recipient. If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution, or taking action based upon the information contained
herein is strictly prohibited. If this e-mail was received in error,
please notify the sender and return the documents immediately.
>
> ************************************************************
>
>
> ----------------------------------------------------------------------
> --
>
> ----------------------------------------------------------------------
> --- This SF.Net email is sponsored by the Moblin Your Move Developer's

> challenge Build the coolest Linux based applications with Moblin SDK &

> win great prizes Grand prize is a trip for two to an Open Source event

> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> Beanshell-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/beanshell-users

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge Build the coolest Linux based applications with Moblin SDK &
win great prizes Grand prize is a trip for two to an Open Source event
anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
*****************************************************
The Contents of this e-mail and any attachments to it may contain confidential and/or legally privileged information. This information is only for use by the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or taking action based upon the information contained herein is strictly prohibited. If this e-mail was received in error, please notify the sender and return the documents immediately.

************************************************************


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: testing scripts

brewer
Just playing with the desktop should answer most of your questions.
Also, the Beanshell manual has a very good section on its use.

But specifically, when you type an executable bit of code into the
desktop console, or "source()" some saved code, the console will report
any problem the interpreter encounters with syntax, etc. If your script
needs outside objects in order to operate, you either instantiate them
with code you type into the console, or you write a test harness script
(or class) that does it for you. And if you need classes, you add the
jars to the Beanshell classpath using "addClassPath()". You can think of
the Beanshell Desktop as an interactive Beanshell interpreter.

Testing code is a very large subject. I use Beanshell Desktop in the
very early stages of development, because it is good for experimentation
and quick feedback.

-Philip Lindsey
www.bbeans.biz

Bowles, Mickey (RIC) wrote:

>  Does this show compilation results?  What is your script needs classes
> from the app that would call it in normal use?  Guess I need to fire up
> Beanshell Desktop.
>
>
> -----Original Message-----
> From: brewer [mailto:[hidden email]]
> Sent: Friday, November 07, 2008 3:27 PM
> To: [hidden email]
> Subject: Re: [Beanshell-users] testing scripts
>
> I start by using the BeanShell DeskTop if I can, which is most of the
> time. (BeansShell DeskTop is executed by launching the bsh.jar.) I even
> use it for testing Java classes during development. Very, very handy.
>
> -Philip Lindsey
> www.bbeans.biz
>
> Bowles, Mickey (RIC) wrote:
>  
>> How do you guys test your beanshell script prior to using in an app?
>> *****************************************************
>> The Contents of this e-mail and any attachments to it may contain
>>    
> confidential and/or legally privileged information. This information is
> only for use by the intended recipient. If you are not the intended
> recipient, you are hereby notified that any disclosure, copying,
> distribution, or taking action based upon the information contained
> herein is strictly prohibited. If this e-mail was received in error,
> please notify the sender and return the documents immediately.
>  
>> ************************************************************
>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>> ----------------------------------------------------------------------
>> --- This SF.Net email is sponsored by the Moblin Your Move Developer's
>>    
>
>  
>> challenge Build the coolest Linux based applications with Moblin SDK &
>>    
>
>  
>> win great prizes Grand prize is a trip for two to an Open Source event
>>    
>
>  
>> anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> ----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> Beanshell-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/beanshell-users
>>    
>
> ------------------------------------------------------------------------
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK &
> win great prizes Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Beanshell-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/beanshell-users
> *****************************************************
> The Contents of this e-mail and any attachments to it may contain confidential and/or legally privileged information. This information is only for use by the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or taking action based upon the information contained herein is strictly prohibited. If this e-mail was received in error, please notify the sender and return the documents immediately.
>
> ************************************************************
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Beanshell-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/beanshell-users
>
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users