[ptt-users] scripting instance error

Alin Simionoiu alin at Medianetdigital.com
Thu Aug 16 12:51:39 PDT 2007


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?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cake.pushtotest.com/pipermail/users/attachments/20070816/ddad95e0/attachment.htm


More information about the Users mailing list