Difference between revisions of "JUnit tests"

From BITPlan can4eve Wiki
Jump to navigation Jump to search
(Created page with "= Running tests agains simulator = The default tests run against a simulated {{Link|target=ELM327}} device. <source lang='bash'> mvn test </source>")
 
 
Line 4: Line 4:
 
mvn test
 
mvn test
 
</source>
 
</source>
 +
 +
 +
= Configuring your test environment =
 +
The default tests described above might give you a warning like
 +
<source lang='bash'>
 +
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
 +
}
 +
</source>
 +
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

Latest revision as of 08:37, 18 June 2017

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