-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started with TSTL Java
Kevin Kellar edited this page Mar 1, 2016
·
6 revisions
#Getting Started with TSTL Java These are some step-by-step guides for getting TSTL-Java working.
##The Installation Process
- Download the latest release as a .zip file. Take care not to download the source code archive instead.
- Extract the downloaded archive.
- Run the install script which is best for your system. Note: both the install and uninstall need root/administrator permissions.
- If using the .sh script (for Unix systems), run it in terminal with
bash <path_to_script>to ensure you can give it "sudo" (or "root") permissions during the installation process. - To grant administrator permissions from Windows (using the .bat) script, right click the .bat file from inside file explorer and select the "Run as Administrator" option.
- If using the .sh script (for Unix systems), run it in terminal with
- Check for a successful installation by opening terminal/command prompt and running
tstljava -h.
See "help" displayed? Good! Nothing broke. Please proceed to the next section.
##First Test
This section will walk you through running your first example test.
- For this demonstration, please use bug_intParse.tstl as the source .tstl file. Download it from the included link.
- Move the .tstl sample file (from your downloads) to an empty folder.
- The folder name should have no spaces in it.
- It's easiest to create an empty folder on your desktop named "tstltest" and move the tstl source file to there
- Open terminal and set its working directory to the new folder
- As of now, it should only contain the tstl source file.
- On Windows Explorer, this can be easily achieved by:
- Navigating to the folder in Windows Explorer
- Hold SHIFT and right click the blank space below the file list
- Select "Open command prompt here"
- Run
tstljavain the terminal. - If you are using bug_intParse.tstl as the tstl source file, it should have crashed and showed you the bug nearly instantly.
- To confirm this behavior happened:
- The process in the terminal should have ended.
- Check the directory that the terminal's working directory is set to. It should now contain a lot more than a .tstl file. Confirm the file "tester-reduced.log" exists in this folder.
- If not, scroll up in terminal and check what went wrong.
- To confirm this behavior happened:
##Testing your own Software
- Create the test home folder by making a blank folder somewhere easily accessible.
- Move the custom .tstl source file to this new directory.
- A sample .tstl file won't cut it this time. The samples are unaware of how your software works.
- Need help writing a .tstl file? See this page.
- Give tstljava a reference to your java classes
- If testing your code as .java (source) files:
- Make a new directory in the test directory named "src".
- Copy all your code (even if it is packaged up) into this directory.
- Example: /src/com/company/example/ could house all your classes. If you aren't using packages, /src/ could also contain your code.
- If using a .jar archive instead:
- Unlike the "src" folder, there is no designated "jar" folder to house your jars. Instead, the "lib" folder could be used.
- Create/navigate to the "lib" folder.
- Copy your jar(s) to the "lib" folder.
- Remember to add your jar(s) to the classpath at runtime by using the switch -j "lib/name_of_jar"
- Split up multiple additions to the classpath with a "~" character. Don't worry, TSTL-Java should convert it to whatever spacing character is appropriate for your system.
- If testing your code as .java (source) files:
- If your code is in a package, be sure to use the @import line in tstljava.
##Final Note Happy Testing. If the instructions do not work properly, please raise an issue.