Skip to content

CodeIntelligenceTesting/Road-Smart

Repository files navigation

RoadSmart - An Example Java Application for Testing

Introduction

RoadSmart is a command-line application used to provide information for major roads all over the world. While it could be helpful, it is also extremely buggy for a CLI app.

This is an application that can be used to show examples of unit, component and fuzz tests that find functional and security bugs in Java code.

This project is maintained by Code Intelligence.

Prerequisites

This project requires:

and has been tested with IntelliJ (recommended) and VS Code.

This project uses JUnit 5.

Installation

This is a standard Maven Java project. You can get dependencies by running

mvn install

Running the Application

RoadSmart is a CLI application. You can currently run this in your IDE by running the main method in the Main class.

Tests

This is the interesting bit. Tests are located in the standard location of src/test/java. Currently, there are

  • Unit tests: these test functionality of various classes, and may be used for test-driven development. These can be executed from your IDE directly or running mvn test.
  • Component Tests: Coming soon!
  • Fuzz Tests: These tests find possible security issues such as SQL Injections. Fuzz tests may be executed using cifuzz, a CLI fuzz tool. More information can be found here.

Unit Tests

To run all unit tests, you can call

mvn test

from the command line or you can run tests individually in your IDE by clicking "Run" next to them.

Fuzz Tests

To run a single fuzz test, run the following from the root of the project:

cifuzz run <name_of_fuzz_test_class>

For example, you can run

cifuzz run InformationDatabaseFuzzTest

to execute the fuzz test InformationDatabaseFuzzTest.

Pull Requests

Pull requests welcome!

Please read CONTRIBUTING.md before submitting your pull requests.

About

An example Java App to show examples of unit, fuzz and component testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages