diff --git a/Getting-Started.md b/Getting-Started.md new file mode 100644 index 0000000..72c0322 --- /dev/null +++ b/Getting-Started.md @@ -0,0 +1,56 @@ +# Table of Content + +- [How to build](#how-to-build) +- [How to test](#how-to-test) + +## How to build + +Larra dev environment provides a dev container environment with all required tools, libraries and configured (locally hosted) ejabberd server. + +Build steps: + +- Install **docker**, **docker-compose** and **VS Code** and open a project in Dev Container +- Build project using Cmake + - Using VS Code Task: "Build Debug GCC" + - Manually + ```bash + mkdir -p build && cd build + cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_EXAMPLES=ON -DENABLE_TESTS=ON .. && cmake --build . --parallel `nproc` + ``` + +## How to test + +### Unit tests + +- Build project with **-DENABLE_TESTS=ON** to enable GTests +- Launch tests + ```bash + ./build/larra_xmpp_tests + ``` + +### Module tests + +- Launch ejabber server by opening a project in a Dev Container environment or start it manually +- Launch client + ```bash + /workspaces/larra/build/examples/output/connect + ``` + +Make sure that larra client with your change is able to pass all tests without errors. For now it supports only **Plain Authentication** check. + +Successful Plain Authentication logs: + +```bash +[info] [connect.cpp] Connecting client... +[info] [printer_stream.hpp] Writing data to stream: +[info] [printer_stream.hpp] Data writing completed: 172 +[info] [printer_stream.hpp] Reading data from stream: +[info] [printer_stream.hpp] Readed data: +[info] [printer_stream.hpp] Reading data from stream: +[info] [printer_stream.hpp] Readed data: PLAIN +[info] [printer_stream.hpp] Writing data to stream: AHRlc3QxAHRlc3Qx +[info] [printer_stream.hpp] Data writing completed: 88 +[info] [printer_stream.hpp] Reading data from stream: +[info] [printer_stream.hpp] Readed data: +[info] [connect.cpp] Done connecting client! +``` \ No newline at end of file