A good looking UI for stress testing serial (RS232) and TCP communication.
- Serial Port Communication: Test communication with devices connected to serial ports.
- TCP Server: Create a TCP server to test network communication.
- Cross-Platform: Build and run on Windows, macOS, and Linux.
- Qt5 and Qt6 Support: Compatible with both Qt5 and Qt6 versions.
- Configure and start the communication port:
- For serial communication, select the port, baud rate, and other settings.
- For TCP communication, set the port and start the server.
- Run the test code on the device: The device should send and receive data according to the test protocol.
- Observe the log section: The log section will show the test results and any errors that occur.
- CMake: A cross-platform build system generator.
- Qt: A cross-platform application framework. You can use either Qt5 or Qt6.
- C++ Compiler: A C++ compiler that is compatible with the Qt version you are using.
This project includes integration tests to verify the TCP server functionality. These tests are located in the test/
directory.
test_tcp.py
: A Python script that acts as a TCP client to test theqCommTest
TCP server.test_tcp.c
: A C program that acts as a TCP client, similar to the Python script.test_tcp.cpp
: A C++17 program that acts as a TCP client, similar to the Python script.
To run these tests, first ensure the qCommTest
application is running and its TCP server is listening on port 6666.
python3 test/test_tcp.py
gcc -o test/test_tcp test/test_tcp.c
./test/test_tcp
g++ -std=c++17 -o test/test_tcp_cpp test/test_tcp.cpp
./test/test_tcp_cpp
For Windows, you might need to link against ws2_32
for the C and C++ tests:
gcc -o test/test_tcp test/test_tcp.c -lws2_32
g++ -std=c++17 -o test/test_tcp_cpp test/test_tcp.cpp -lws2_32
To build the project using CMake:
-
Create a build directory:
mkdir build cd build
-
Configure CMake to use a specific Qt version (e.g., Qt6):
cmake .. -DQT_VERSION=6
Note: Replace
-DQT_VERSION=6
with-DQT_VERSION=5
to build with Qt5. -
Build the project:
cmake --build .
To build the project using qmake
(for Qt Creator or command line):
-
For Qt5:
qmake -qt=qt5 qCommTest.pro make
-
For Qt6:
qmake -qt=qt6 qCommTest.pro make
Note: You might need to specify the full path to
qmake
if it's not in your PATH, e.g.,/path/to/Qt/5.x.x/gcc_64/bin/qmake
or/path/to/Qt/6.x.x/gcc_64/bin/qmake
.
- Install Chocolatey: If you don't have Chocolatey, install it by following the instructions on the Chocolatey website.
- Install CMake, Qt, and a compiler:
choco install cmake qt-creator-ide qt6-base qt6-serialport
- Install Homebrew: If you don't have Homebrew, install it by following the instructions on the Homebrew website.
- Install CMake and Qt:
Note: You can also use
brew install cmake qt5
qt6
instead ofqt5
.
- Install dependencies:
Note: For Qt5 compatibility, you can use
sudo apt-get update sudo apt-get install build-essential cmake qtcreator qt6-base-dev qt6-declarative-dev qt6-serialport-dev
qtbase5-dev libqt5serialport5-dev
instead.
Eray Öztürk (@diffstorm)
This project is licensed under the GPL-3.0-only License.