[ptt-users] scripting instance error

Frank Cohen fcohen at pushtotest.com
Thu Aug 16 13:26:19 PDT 2007


Dear Alin: Thank you for your interest in TestMaker.

I recommend you take a look at the documentation and the tutorials.  
Use the Help menu. You may also read the user guide and tutorials  
online at http://docs.pushtotest.com and file:////Applications/ 
PushToTest_TestMaker/docs/tutorial/tutorial_languages.html

See the attached two files (mytest.py and testf.xml) that uses your  
code in a functional test scenario. This works on my machine.

-Frank



-------------- next part --------------
A non-text attachment was scrubbed...
Name: mytest.py
Type: text/x-python-script
Size: 640 bytes
Desc: not available
Url : http://cake.pushtotest.com/pipermail/users/attachments/20070816/d650e37b/mytest-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testf.xml
Type: text/xml
Size: 1372 bytes
Desc: not available
Url : http://cake.pushtotest.com/pipermail/users/attachments/20070816/d650e37b/testf-0001.xml
-------------- next part --------------




On Aug 16, 2007, at 12:51 PM, Alin Simionoiu wrote:

> I have a hard time understanding how the script engine works.
>
>
>
> I modified a little bit the example_agents/monitoringExample (it  
> was the simplest script that I could find) to teach myself about  
> scripting abilities of TestMaker.
>
> Basically the new file looks like this:
>
> from junit.framework import TestCase
>
> import sys, re, time
>
> from java.lang import Exception
>
>
>
> class myjython:
>
>
>
>     def __init__( self ):
>
>         ''' Initialize the test case '''
>
>         print "Example1 here: Initializing"
>
>         pass
>
>
>
>     def message( self ):
>
>         print "Monitoring from here..."
>
>
>
>     def setUp( self ):
>
>         ''' Add any needed set-up code here. '''
>
>         pass
>
>
>
>     def runtest( self ):
>
>         print "Monitoring from here..."
>
>
>
>     def tearDown( self ):
>
>         ''' Add any needed code to end the test here. '''
>
>         pass
>
>
>
>
>
> def getmyjython():
>
>    return myjython()
>
>
>
> Now running mytestmonitor.xml for method message works fine. When I  
> try to run method ?runtest? it says   
> java.lang.NoSuchMethodException: runtest
>
> this doesn?t make any sense. can anybody please explain to me what  
> am I missing?
>
>
>
> Regards,
>
> Alin
>
>
>
> P.S
>
> Where do I setup the TestNode log4j file?
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/users



--
Frank Cohen, PushToTest, http://www.PushToTest.com, phone 408 374 7426
TestMaker: The open-source SOA test automation tool





More information about the Users mailing list