Compsci 6/101, Spring 2011, Snarfable APTs

Background

Beginning on Oct 29 the APTs we do in class are available via 'snarfing' so that you can test and run in Eclipse rather than using the web-based system that we had been using until Oct 29.

Use the Ambient Snarfer Site window and choose one of the APTs you want to snarf as shown in the screen capture below.

snarfable apt

After snarfing the APT, you'll need to create a Python module that's specific to the APT you're doing. Every APT you snarf will have several files in the src folder including python modules ETester.py, Parse.py, and StoppableThread.py. These are part of the APT testing framework and you can ignore them (except for ETester.py which you'll run as shown below)

In the example shown here, I created MemberCheck.py in the src folder just as though you'd create in when doing an APT, but the folder is specified as apt_membercheck via snarf. In the screen capture below you can see that I've created MemberCheck.py in the snarfed project and I'm ready to test a simple (and wrong) implementation.

Running the APT to test

Instead of running MemberCheck.py you need to run the module ETester.py which will all the code you wrote in MemberCheck.py. For every APT you implement in Ecilpse, you'll run ETester.py to test the module and function you wrote for the APT. The ETester.py module you snarf is specific to the APT you're doing. Below is a screen shot as I am about to run the ETester.py module, which will call the code I wrote in MemberCheck.py so I can test my code.

Seeing Results

Running ETester.py will generate two files in the src folder. One called results.html and one called perc. To see these in the folder you may need to select src and right-click and select Refresh. Then you can simply click on the results.html file to see your results. In the screen shot below I show my all-green result after fixing my implementation.