-
Notifications
You must be signed in to change notification settings - Fork 32
Getting Started
Home -> User Guide ->
This document was last updated on February 24, 2021.
- A Java JRE at level 1.8 or above
- A Cobol compiler (the distribution assumes GnuCOBOL)
Download a Cobol Check distribution archive from the project home page.
Distributions are in zip format. Use any zip utility to unpack the file. Here's an example for Linux systems:
cd [your-project-root]
unzip cobol-check-0.1.0.zip Here's the output from an actual unzip on a Linux system:
neopragma@mint21:~/projects/cobol-check-user$ unzip cobol-check-0.0.0-2.zip
Archive: cobol-check-0.0.0-2.zip
creating: scripts/
inflating: scripts/linux_gnucobol_run_tests
inflating: cobolcheck
inflating: config.properties
creating: src/
creating: src/test/
creating: src/test/cobol/
creating: src/test/cobol/ALPHA/
inflating: src/test/cobol/ALPHA/AlphaExpectationsTest
creating: src/test/cobol/NUMBERS/
inflating: src/test/cobol/NUMBERS/SymbolicRelationsTest
creating: src/main/
creating: src/main/cobol/
creating: src/main/cobol/ALPHA/
inflating: src/main/cobol/ALPHA/ALPHA.CBL
creating: src/main/cobol/NUMBERS/
inflating: src/main/cobol/NUMBERS/NUMBERS.CBL
creating: bin/
inflating: bin/cobol-check-0.0.0.jar
neopragma@mint21:~/projects/cobol-check-user$ This creates the Default Directory Structure and places the following files there:
- The Cobol Check shell script,
cobolcheck - The Cobol Check configuration file,
config.properties - The executable jar,
bin/cobol-check-[version].jar - Sample Cobol programs in
src/main/cobol - Sample test suites in
src/test/cobol - A script that Cobol Check uses to compile and run test programs, in
scripts/linux_gnucobol_run_tests.
Run the samples and see if it works.
If you installed GnuCOBOL as described here, then the directory where GnuCOBOL was installed is on your Path. When you open a command-line window to run Cobol Check, you must run the script that sets environment variables in that shell before you run Cobol Check.
Installed in this way, Cobol Check runs under minGW using scripts developed by Keisuke Nishida, Roger While, Ron Norman, Simon Sobbisch, and Edward Hart. They ask users to run GnuCOBOL from within the installation directory. To set up Cobol Check to run from within the root directory of your Cobol project, you have to set the same environment variables as they use in their scripts.
Run this first:
[path-to-gnucobol-installation]\set_env.cmd Now run Cobol Check to see if it handles the sample programs properly:
cobolcheck.cmd -p ALPHA NUMBERS If everything is installed correctly, you will see test results on stdout.
If you are using a different Cobol compiler than GnuCOBOL, change the scripts/linux_gnucobol_run_tests script accordingly.
./cobolcheck -p ALPHA NUMBERS If everything is installed correctly, you will see test results on stdout.
You can use the samples as a starting point to start building out test suites for your Cobol application.