MarathonMarathon.html
HomeHome.html
MarathoniteMarathonite.html
CompanyCompany.html
ContactContact.html
Webloghttp://blog.marathontesting.com
 

Creating a Project

The following screencast walks you through how to create a Marathon project.

Transcript

Project Selection Dialog =========


We start marathon by using the scripts included in the distribution. Use 'marathon' shell script on Unix systems and marathon.bat on Windows platform. By adding the Marathon installation directory to the system PATH, we can launch Marathon from anywhere in the system.


Once started, Marathon displays a project selection dialog. Using this dialog we can select a recently used Marathon project or create a new project.


The project directory combo box displays the last 5 recently used Marathon projects.


Click the browse button to select a project directory from the file system.


Selecting Cancel quits Marathon.


The OK,, and Modify options are enabled when a project is selected.


For now let us use New to create a new project.


Project Configuration Dialog ==============================


The configuration dialog is split into multiple tabs. We use this form to provide application launch information as well as configure other aspects of Marathon like custom assertions, resolvers and script specific configuration. For this screencast, we use only minimal necessary setup.


Project Panel========


The project panel is where we provide the project meta information.


In the name field, give a name to the Marathon project. We can use any characters in this field. For the purposes of this demo, we give 'Marathon Example Project'.


The directory is where Marathon stores all the project related files. Click on Browse to select a directory from the file system. If the directory does not exist, Marathon creates the directory.


Let us select a 'Marathon Example' as the directory.


We can provide any free form text in the description field.


The last field in the Project panel is the selection of a script. Once a Marathon project is created, the script model can not be changed.


Marathon currently supports Jython and JRuby script models. Marathon also bundles a version of these packages. If you want to use a different version, you can download the appropriate package and configure the Home directory in either the Python Path or the Ruby Path panels.


For this screencast we will select the JRuby script model and use the bundled version of the script.


Main Panel===


In the main panel we enter the launch information for the application.


In the main class field enter the name of the Main class for the java application. We need to enter the class name including any package prefixes that are needed.


Marathon comes with a sample application. For this screencast let us use it by entering net.sourceforge.marathon.examples.SampleApp.


Enter any arguments required by the application in the program arguments field. These are the arguments that occur after the main class name on the java command line.


We enter the arguments to the java command itself in the VM arguments field. We also exclude the class path and java properties from this field.


Typically this field is used to enter the java heap size. Though not needed, we set this field for demonstration purposes.


We can override the working directory by setting the working directory field. If left blank, Marathon launches the application under test in the same directory from which Marathon itself is launched.


The Javr a Executable field can be left blank. This is used to run the application with a different java version than the one that started Marathon. If necessary, this field should contain the full path to the Java executable.


Finally, the platform specific command/control key is used to run tests recorded on OSX platforms on non-OSX platforms and vice versa. This needs to be set only if the application uses different command keys on Mac and non-mac platforms.


Classpath Panel===


We need to provide the Java class path needed to launch the application in the classpath panel.


Use 'Add Archives' to add Jar and Zip files to the classpath.


Use 'Add folders' to add class folders to the class path.


We can use 'Remove' to delete an entry from the class path.


Up and Down are used to move the entries in the list.


Our sample application is in a Jar file in the marathon installation. We will select and add that Jar file.


If we use any custom resolvers or naming strategies, the class path entries for them also should be included here.


Properties panel===


Add any required Java properties in the properties panel. The sample application recognizes two properties. We will set them in this panel.


Testing the application===


Now that we provided all the information required to launch the application we can check our settings by launching the application.


Click on the test button to launch the application using the given configuration. In case of errors, you can review the output from the application in the standard error and standard output panes.


We will use the Close button to close the test application dialog.


Now that the application is successfully configured we can save the configuration.


Clicking OK in the selection dialog opens up Marathon main window.


Summary===


With this we come to the end of this episode. We will see how we can use Marathon to record and play a test case in the next episode.


Thank you for watching this screencast. We hope this show has provided you with some edutainment. Do not forget to send your feedback. Our email id is marathontesting@gmail.com.