Sunday, January 8, 2012

jlab : Your own Java Testing Lab by VasLabs for you!

What is the way of programming big programs? You create object classes and test them individually. You configure them to work as you want and then you put them together to form a nice new shiny program.
Most of the programmers use IDE's to do that. However, if you are a hardcore of the kind, you may wish to create your own environment just as how you like it to be.
VasLabs has created a small script to give you ideas and/or help you start building your own lab environment to do what everyone does in labs; tests!
The philosophy behind it is that for every object class you get a test class. And for every test you do, you can view a log file containing the results. Then you can compare it with the expected results by reading it or using cmp, or even better, you could initially create a file that contains the expected results and then use jlab to run the test by comparing for you both results.
The program works on your current directory. I.e. you should change directory to the directory you want to build your lab and then run jlab.
Here is the manual of the program (you can also view it by running jlab without arguments):

To use this program use the format jlab --argument [file]
-----------------------------------
The list of available arguments are:
--initialise
Initialises your lab environment in your current directory creating the appropriate folders

--create [file1 ... fileN]
Creates the given class names and puts them in the src directory. It also opens them using gedit

--create_tests
Creates a test class for each class in the src directory. It then opens them with gedit

--compile
Compiles every src file in all directories and puts the .class files in the bin directory

--run_tests
Runs all tests and puts the results in log files. Then it opens the log files with gedit

--test file expectedResults
Runs the given test file and compares its results with the given expectedResults file. If there is a difference it opens the results with gedit

Requires: gedit text editor

Author: Vasilis Nicolaou
Distributed by: vaslabs
User Agreement:

This script shall be used with care by people who know what they are doing. This program intends to help building a java lab. By java lab
we mean a virtual environment that behaves like IDE with the difference that offers simple functionalities for testing java object classes.
The author has no responsibility for any loss of data or damage caused by using this script.
You can edit and re-distribute this script as you wish. If you do not agree delete this script file from you computer.

Tip: You can create aliases for every different functionality and put it in .my_bashrc
08/01/2012



Using this idea you can build a similar lab for every language or facility you want.
Download it from here.
This is written in bash, and therefore can be run only on Unix based OS which have bash installed.
By VasLabs


No comments:

Post a Comment