Build and Execution #
Executing the server #
To build the ticket system, you can run the following command from the repository’s root folder:
go build ./cmd/ticketsystem
Make sure to build the executable from the mentioned directory so that
the default paths still apply correctly. Your binary should be located
at ticketsystem
or ticketsystem.exe
depending on your operating
system then which can be executed with
./ticketsystem [options]
A more convenient way to start the server is to use the start scripts in the root directory. Run
./startServer.sh [options]
or startServer.bat
on Windows systems. The same applies to the
command-line tool (./startCLI.sh
and startCLI.bat
). Note that
the start scripts do not require a previous build using go build
.
See the Server Usage page and the
CLI Usage page for a list of valid options.
Executing the tests #
The unit tests for the different components of the server can be executed with the following command from the root directory:
go test -v ./...
Alternatively, a coverage report can be generated by using the script
coverage_report.sh
. This executes all tests with a coverage analysis
and documents the results in an output report. Learn more about this
procedure on Generating a Coverage Report.