Completing small items.

This commit is contained in:
2026-04-04 08:56:12 +02:00
parent d527f2a844
commit 9942f33458
5 changed files with 82 additions and 5 deletions

View File

@@ -0,0 +1,47 @@
# testium training slides
Beamer presentation (LuaLaTeX) for the testium training.
## Compilation
Requires LuaLaTeX with the `minted` package (which requires Python and `pygments`).
```sh
make
```
The output PDF is generated in `build/`.
To clean the build directory:
```sh
make clean
```
## Document architecture
```
src/
├── main.tex # Entry point — includes all sections
├── preamble.tex # Packages, theme, colors, macros
├── images/
│ └── logo.png
└── sections/
├── title.tex # Title page
├── summary.tex # Table of contents
├── intro.tex # Introduction: features, input files, CLI, variables, inline eval, links
├── installation.tex # Installation from binary or sources
├── items.tex # Test items reference (console, py_func, loop, check, etc.)
├── functionalities.tex # Advanced features: result processing, includes, templating, reports
├── tips.tex # Tips and tricks
└── conclusion.tex # Thank you + contact
```
### Macros
| Macro | Usage |
|---|---|
| `\incode{text}` | Inline code (bold blue monospace) |
| `\tum{text}` | testium name highlight (bold orange italic) |
| `\pass{text}` | PASS result (bold green monospace) |
| `\fail{text}` | FAIL result (bold red monospace) |

View File

@@ -26,9 +26,30 @@
\end{frame} \end{frame}
\begin{frame}[fragile]{Result processing example} \begin{frame}[fragile]{Result processing example}
\begin{columns}
\column{0.5\textwidth}
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml} \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml}
- TBD: - py_func:
name: Get device status
file: device.py
func_name: get_status
process_result: <|$(result)['temperature']|>
expected_result: 25.0
\end{minted} \end{minted}
\column{0.5\textwidth}
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml}
- console:
name: Read firmware version
console_name: serial_console
steps:
- writeln: version
- read_until:
expected: "version:"
timeout: 5
process_result: <|$(result).split()[-1]|>
expected_result: "1.2.3"
\end{minted}
\end{columns}
\end{frame} \end{frame}
\begin{frame}[fragile]{Includes} \begin{frame}[fragile]{Includes}

View File

@@ -270,7 +270,7 @@ report:
\end{itemize} \end{itemize}
\end{frame} \end{frame}
% ===== Links for documentation / code =====evaluation and % ===== Links for documentation / code =====
\subsection{Documentation and example code} \subsection{Documentation and example code}
\begin{frame}{Links for documentation and example code} \begin{frame}{Links for documentation and example code}

View File

@@ -93,8 +93,10 @@
\end{itemize} \end{itemize}
\item \incode{loop} test item specific variables \item \incode{loop} test item specific variables
\begin{itemize} \begin{itemize}
\item \incode{loop\_index} : loop index (starting from 0) \item \incode{loop\_index} : loop index (starting from 0)
\item \incode{loop\_param} : current value of the loop iterator \item \incode{loop\_index\_inverse} : loop index in reverse order
\item \incode{loop\_count} : total number of iterations
\item \incode{loop\_param} : current value of the loop iterator
\end{itemize} \end{itemize}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
@@ -187,9 +189,16 @@ def dummy_func(param1, param2, param4, param4):
\begin{frame}[fragile]{\incode{lua\_func} test item function call} \begin{frame}[fragile]{\incode{lua\_func} test item function call}
\begin{itemize} \begin{itemize}
\item Calls the a lua function from a module \item The lua file must import helper's module \incode{testium}
\item Calls a Lua function by its name
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{lua} \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{lua}
tm = require("testium") tm = require("testium")
function dummy_func(param1, param2)
local value = tm.gd("global_dict_key")
...
return 10
end
\end{minted} \end{minted}
\begin{itemize} \begin{itemize}
\item To get a variable from the global dictionnary : \incode{tm.gd("global\_dict\_key")} \item To get a variable from the global dictionnary : \incode{tm.gd("global\_dict\_key")}

Binary file not shown.