First complete prototype. To be polished.

This commit is contained in:
2026-01-19 23:49:59 +01:00
parent 050fcb2b4d
commit 991916ab42
7 changed files with 257 additions and 11 deletions

View File

@@ -15,5 +15,6 @@
\include{sections/items}
\include{sections/functionalities}
\include{sections/tips}
\include{sections/conclusion}
\end{document}

View File

@@ -43,8 +43,8 @@
% =====================
% Informations
% =====================
\title{Testium training}
\subtitle{Introduction tutorial}
\title{\tum{testium}}
\subtitle{Tool introduction training}
\author{François Dausseur}
% \institute{Nom de l'entreprise}
\date{\today}
@@ -73,7 +73,6 @@
frame=none
}
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
@@ -85,3 +84,25 @@
\end{beamercolorbox}%
}
}
\definecolor{linkcolor}{RGB}{0,102,153} % bleu pro
\definecolor{urlcolor}{RGB}{80,80,80} % gris foncé
\definecolor{citecolor}{RGB}{0,102,153}
\hypersetup{
colorlinks=true,
linkcolor=linkcolor,
urlcolor=linkcolor,
citecolor=linkcolor,
pdfborderstyle={/S/U/W 1} % underline
}
\captionsetup{
font=scriptsize
}
\AtBeginSection[]{
\begin{frame}{Summary}
\tableofcontents[currentsection]
\end{frame}
}

View File

@@ -1,9 +1,16 @@
\section{Conclusion}
\begin{frame}{Conclusion}
\begin{frame}{Questions ?}
\centering
\vfill
{\Huge\bfseries Thank you}
\vfill
\end{frame}
\begin{frame}{Contact}
\begin{itemize}
\item Template prêt à l'emploi
\item Compatible environnements entreprise
\item Adaptable à votre charte graphique
\item François Dausseur
\item francois.dausseur@free.fr
\item \url{https://git.beafrancois.fr/v_and_v/testium}
\end{itemize}
\end{frame}

View File

@@ -0,0 +1,204 @@
\section{\tum{testium} functionalities}
\begin{frame}{Post-processing test items results}
\begin{itemize}
\item You can process the result directly in the item using :
\begin{itemize}
\item \incode{process\_result}: To process the result of an item Done before \incode{expected\_result}
\item \incode{expected\_result}: Set the expected result of the item
\end{itemize}
\item \incode{\$(result)}: test item result expansion
\item \incode{process\_result}
\begin{itemize}
\item Process the result with a python evaluation
\item Test is \incode{PASS} if value is \incode{True}
\item It can typically
\begin{itemize}
\item Store a variable
\item Make a complex test, replacing a \incode{check} item
\end{itemize}
\end{itemize}
\item \incode{expected\_result}
\begin{itemize}
\item Check if it equals the test item result (processed or not)
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Result processing example}
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml}
- TBD:
\end{minted}
\end{frame}
\begin{frame}[fragile]{Include}
\begin{itemize}
\item a .tum file can be included from another .tum file
\item There is no limit on the number of included files
\item The included file must not have a \incode{main} defined
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml}
#include with the sub-sequence reference mechanism
sequence: &included_sequence
!include included_file.tum
main:
name: Test example
steps:
- test_item1:
name: test_1
- *included_sequence
#include can also be inserted directly within the steps list
- !include included_file.tum
\end{minted}
\end{itemize}
\end{frame}
\begin{frame}{Templating}
\begin{itemize}
\item A template engine is a files preprocessor
\item applies to all \tum{testium} files
\begin{itemize}
\item main test file
\item any included file
\end{itemize}
\item Files are processed at the moment the test is opened
\item recursively on all included sub-tests
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Template engine syntax}
\begin{columns}
\column{0.6\textwidth}
\begin{itemize}
\item Any test file can use the Jinja syntax for templates
\begin{itemize}
\item \href{https://jinja.palletsprojects.com/en/stable/}{Template Documentation}
\end{itemize}
\item expressions
\begin{itemize}
\item \incode{\{\{ my\_expression \}\}}
\end{itemize}
\item control sequences
\begin{itemize}
\item \incode{\{\% if condition \%\} ... \{\% endif \%\}}
\item \incode{\{\% for iterator \%\} ... \{\% endfor \%\}}
\item ...
\end{itemize}
\item All config-file parameters can be used in templates
\end{itemize}
\column{0.4\textwidth}
\begin{listing}[H]
\begin{minted}[fontsize=\fontsize{5}{6}\selectfont]{yaml}
items:
- common
- check
- console
- cycle
- dialogs
\end{minted}
\begin{minted}[fontsize=\fontsize{5}{6}\selectfont]{yaml}
config_file:
- param.yaml
main:
[...]
{% for item in items %}
# item test
- let:
name: test constants
values:
test: {{ item }}
test_path: items/$(test)
- group:
name: {{ item }} test
action:
- !include items/{{ item }}/test.seq
- !include items/report.seq
{% endfor %}
[...]
\end{minted}
\caption{\incode{param.xml} followed by \incode{main.tum}}
\end{listing}
\end{columns}
\end{frame}
\begin{frame}[fragile]{Template parameters}
\begin{itemize}
\item main file
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml}
main:
name: Test example
steps:
- test_item1:
name: test_1
- !include
file: included_template_file.tum
inclusion_parameter_1: param1
inclusion_parameter_2: param2
\end{minted}
\item \incode{included\_template\_file.tum}
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml}
- test_item:
name: {{ inclusion_parameter_1 }}
- {{ inclusion_parameter_2 }}:
name: test_3
# The following construction is not allowed and will fail to load:
- test_item:
name: {{ $(inclusion)_parameter_3 }}
\end{minted}
\end{itemize}
\end{frame}
\begin{frame}{JINJA syntax vs \tum{testium} syntax}
\begin{itemize}
\item Jinja and \tum{testium} syntax super-imposed
\begin{itemize}
\item Jinja is evaluated first, when the test is loaded
\item then \tum{testium} displays the result of template pre-processing
\end{itemize}
\item loops
\begin{itemize}
\item Jinja : loops result in a flat sequence of steps
\item \tum{testium} : The loop is a test item and its iterations can depend on runtime parameters
\end{itemize}
\item conditional execution
\begin{itemize}
\item Jinja : The item appears or not, depending on static configuration parameter, or jinja syntax
\item \tum{testium} : The condition can depend on runtime parameters
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile]{\incode{report} section and test items}
\begin{columns}
\column{0.6\textwidth}
\begin{itemize}
\item Supports sqlite, Junit, JSON, txt formats
\item Designed to ease the addition of new formats if any specific request
\item Added to the root of the main .tum file
\begin{itemize}
\item \incode{path}: The report path
\item \incode{file\_name}: The name of the report file
\item \incode{export}: The type of export
\item \incode{log\_stored}: Stores the log extracts in the report
\end{itemize}
\item the \incode{report} test item can also generate some intermediate reports
\begin{itemize}
\item the \incode{key} test item parameter allows to filter reported steps
\end{itemize}
\end{itemize}
\column{0.4\textwidth}
\begin{listing}[H]
\begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml}
report:
enabled: True
log_stored: True
export:
junit:
path: $(validation_report_path)
file_name: $(validation_report_file).junit
\end{minted}
\caption{\incode{report} example}
\end{listing}
\end{columns}
\end{frame}

View File

@@ -96,7 +96,7 @@ main:
\item \tum{testium} can be invoked with the following options:
\begin{itemize}
\item \incode{-h}: command line help
\item \incode{-b}: batc5h mode (execution of the test script without GUI)
\item \incode{-b}: batch mode (execution of the test script without GUI)
\item \incode{-c}: Use a specific config file
\item \incode{-i}: Set a specific include path
\item \incode{-g}: Run in debug mode (for vscode debug only)

View File

@@ -82,9 +82,13 @@
\begin{itemize}
\item \incode{cn\_<item\_name>} : Containing the last data which has been read in the console
\end{itemize}
\item func test itm specific variables
\item \incode{py\_func} test item specific variables
\begin{itemize}
\item \incode{fn\_<item\_name>} : The returned value of the last func test item execution
\item \incode{pfn\_<item\_name>} : The returned value of the last \incode{py\_func} test item execution
\end{itemize}
\item \incode{lua\_func} test item specific variables
\begin{itemize}
\item \incode{lfn\_<item\_name>} : The returned value of the last \incode{lua\_func} test item execution
\end{itemize}
\item loop test item specific variables
\begin{itemize}
@@ -381,5 +385,14 @@ tm = require("testium")
\end{minted}
\caption{\incode{json\_rpc} query and answer separated}
\end{listing}
\end{columns}
\end{columns}
\end{frame}
\begin{frame}{Other test items}
\begin{itemize}
\item \incode{plot}: Displays and stores time series data
\item \incode{run}: Execute a new instance of \tum{testium}
\item \incode{unittest\_file}: Runs a Python file based on the unittest framework
\end{itemize}
\end{frame}