Step 8: Testing the application

It's now time to test the whole application.

We didn't develop yet an interface that allows users to input their contributions, for example via a web page. We will do that in the next part of this tutorial. We can, however, simulate user input and create the picture by programmatically calling the service commands we created in the previous chapters. We will do this in the script that is called each time the application is started.

Whenever you create a new project, Obix creates a run system command file (run.sh on Unix systems, and run.bat on Windows systems) which is located in your project's root directory. Executing this system command runs the application. The first script executed each time an application starts is a service command located in the root library of the Obix source code directory and whose identifier-suffix is equal to the project's identifier-suffix. In our case the path to this service command is li_random_arcs.se_random_arcs.co_run. By default this command just displays a message on the system console. To create an SVG picture instead proceed as follows:

If everything went fine you should now see the following files in your projects root directory:

You can now open file picture.svg with any application that supports SVG files, for example:

Here is an example of the result:

Figure 7.2. Example of random arcs

Example of random arcs

If you run the application 4 times the picture looks like this:

Figure 7.3. Example of random arcs

Example of random arcs