User Tools

Site Tools


java:testpi4j

TestPI4J: A testing framework for your PI4J Projects

Intro

Have you ever wondered to test your PI4J projects directly from your computer. Avoiding this routines of compile - copy into the pi - run?? Me to. This project is to allow precisely this: I've made a testing PI4J library so you can test your development from your computer.

Check this out:

It's my eclipse running a PI4J program, directly. The PI calls are packaged, sent over the network to the raspberry pi and there a server executes them, receives the answer and send the answer back to the computer.

This way, you can develop in your PC while the Pi stuff code is executed in the raspberry pi.

Installation instructions

Start to work with TestPI4J is easy: you only have download two files in the files section of the project: testpicore-1.0.zip and pi4jserver-1.0.zip. Or their Linux equivalents (with tgz extension).

Once you have downloaded these files, you have to install the server (pi4jserve-1.0.zip) in the raspberry PI: just unpack the contents in a folder and run the pi4jServer.sh file as root.

Back in your application, you have to replace the file pi4j-core.jar with the file testpicore.jar. In eclipse, you should remove from the classpath in Project → properties and add the new one.

Place the file testPiCore.properties in the main directory of your project and configure it accordingly. That's it you have to do to start running you PI4J applications directly into your PC.

java/testpi4j.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1