JUnit tests

From BITPlan can4eve Wiki
Jump to: navigation, search

Running tests agains simulator

The default tests run against a simulated ELM327 device.

mvn test


Configuring your test environment

The default tests described above might give you a warning like

Warning: Device configuration for tests missing - only tests with simulator will work!
Please see http://can4eve.bitplan.com/index.php/JUnit_tests
for how to configure the test environment.

you might want to create a file /Users/wf/.can4eve/testconfig.json
with json content like the following example
{
  "serialDevice": "cu.usbserial-113010822821",
  "serialBaud": 115200
}

To configure your devices you might want to create a json file that contains the description of your devices. If you put the json file in a subdirectoy of your homedirectoy called ".can4eve" and name the file testconfig.json