Started the edition
This commit is contained in:
@@ -11,8 +11,9 @@
|
||||
\include{sections/title}
|
||||
\include{sections/summary}
|
||||
\include{sections/intro}
|
||||
\include{sections/examples}
|
||||
\include{sections/bouh}
|
||||
\include{sections/conclusion}
|
||||
\include{sections/installation}
|
||||
\include{sections/items}
|
||||
\include{sections/functionalities}
|
||||
\include{sections/tips}
|
||||
|
||||
\end{document}
|
||||
@@ -7,6 +7,9 @@
|
||||
\usepackage{graphicx}
|
||||
\usepackage{listings}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{minted}
|
||||
\usepackage{caption}
|
||||
\usepackage{courier} % Excellent bold support for typewriter font
|
||||
|
||||
% =====================
|
||||
% Thème "entreprise"
|
||||
@@ -23,6 +26,11 @@
|
||||
\setbeamercolor{title}{fg=white,bg=CorporateBlue}
|
||||
\setbeamercolor{normal text}{fg=CorporateGray}
|
||||
|
||||
\definecolor{codegray}{gray}{0.45}
|
||||
\definecolor{deepblue}{RGB}{0, 0, 139}
|
||||
|
||||
\newcommand{\incode}[1]{\texttt{\textbf{\textcolor{deepblue}{#1}}}}
|
||||
|
||||
% =====================
|
||||
% Police moderne
|
||||
% =====================
|
||||
@@ -52,6 +60,15 @@
|
||||
showstringspaces=false
|
||||
}
|
||||
|
||||
\definecolor{codebg}{rgb}{0.95,0.95,0.95}
|
||||
|
||||
\setminted{
|
||||
fontsize=\fontsize{5}{6}\selectfont,
|
||||
bgcolor=codebg,
|
||||
breaklines=true,
|
||||
frame=none
|
||||
}
|
||||
|
||||
|
||||
\setbeamertemplate{footline}{
|
||||
\leavevmode%
|
||||
|
||||
0
src/sections/functionlities.tex
Normal file
0
src/sections/functionlities.tex
Normal file
@@ -1,8 +1,289 @@
|
||||
% ===== Introduction =====
|
||||
\section{Introduction}
|
||||
|
||||
% ===== Main features =====
|
||||
\subsection{Main features}
|
||||
|
||||
\begin{frame}{\texttt{testium} main features}
|
||||
\begin{columns}
|
||||
\column{0.45\textwidth}
|
||||
\begin{itemize}
|
||||
\item Automates the execution of tests
|
||||
\item GUI or console mode
|
||||
\item Stores logs
|
||||
\item Generates test reports
|
||||
\item Usable for production and engineering testings
|
||||
\item Mainly based on:
|
||||
\begin{itemize}
|
||||
\item Python3
|
||||
\item QT6
|
||||
\item Jinja2
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\column{0.55\textwidth}
|
||||
\vfill
|
||||
\includegraphics[width=\linewidth]{testium_gui.png}
|
||||
\vfill
|
||||
\end{columns}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}[fragile]{\texttt{testium} input files}
|
||||
\begin{columns}
|
||||
\column{0.5\textwidth}
|
||||
\begin{itemize}
|
||||
\item Test scripts (.tum)
|
||||
\begin{itemize}
|
||||
\item Files written in \incode{YAML}
|
||||
\item Wide range of test items
|
||||
\item Loops, Variables, conditional execution
|
||||
\item Modular templating using \incode{Jinja2}
|
||||
\end{itemize}
|
||||
\item Configuration files (.yaml, .yml)
|
||||
\begin{itemize}
|
||||
\item \incode{YAML} test configuration / parameters
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\begin{listing}[H]
|
||||
\begin{minted}{yaml}
|
||||
# All sub directory in items are evaluated as a list
|
||||
items: $| [os.path.basename(f.path) for f in os.scandir(os.path.join("$(test_directory)", "items")) if f.is_dir()] |
|
||||
|
||||
# Parameters of the validation execution
|
||||
validation_report_path: $(test_directory)/../tmp/
|
||||
validation_report_file: validation
|
||||
|
||||
# various parameters
|
||||
windows_prompt: ">"
|
||||
linux_prompt: "$ "
|
||||
[...]
|
||||
\end{minted}
|
||||
\caption{Example of config file}
|
||||
\end{listing}
|
||||
|
||||
\column{0.5\textwidth}
|
||||
\begin{listing}[H]
|
||||
\begin{minted}{yaml}
|
||||
config_file:
|
||||
- param.yaml
|
||||
{% for item in items %}
|
||||
- "items/{{ item }}/param.yaml"
|
||||
{% endfor %}
|
||||
main:
|
||||
name: testium validation suite
|
||||
action:
|
||||
- group:
|
||||
name: Test preparation
|
||||
action:
|
||||
- let:
|
||||
name: Set test variables for Linux
|
||||
condition: "'$(os)' == 'Linux'"
|
||||
values:
|
||||
- terminal_prompt: $(linux_prompt)
|
||||
- psep: "/"
|
||||
- let:
|
||||
name: Set test variables for Windows
|
||||
condition: "'$(os)' == 'Widarkbluendows'"
|
||||
values:
|
||||
[...]
|
||||
\end{minted}
|
||||
\caption{Example of test file}
|
||||
\end{listing}
|
||||
\end{columns}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{command line interface}
|
||||
\begin{itemize}
|
||||
\item \incode{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{-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)
|
||||
\item \incode{-r}: Run the test and close
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}[fragile]{Test scripts}
|
||||
\begin{columns}
|
||||
\column{0.6\textwidth}
|
||||
\begin{itemize}
|
||||
\item Hierarchic list of test items
|
||||
\begin{itemize}
|
||||
\item \incode{main} is the root of the test script
|
||||
\item \incode{config\_file} list of config/params files
|
||||
\item \incode{report} global report parameters section
|
||||
\end{itemize}
|
||||
\item \incode{main} contains test items
|
||||
\begin{itemize}
|
||||
\item executed iteratively from top to bottom
|
||||
\item container items can have children
|
||||
\begin{itemize}
|
||||
\item \incode{loop}
|
||||
\item \incode{group}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\item \incode{!include} directive
|
||||
\begin{itemize}
|
||||
\item include sub-tests
|
||||
\item allow the use of templates
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\column{0.4\textwidth}
|
||||
\begin{listing}[H]
|
||||
\begin{minted}{yaml}
|
||||
|
||||
config_file:
|
||||
- param.yaml
|
||||
|
||||
main:
|
||||
name: Training file demo
|
||||
action:
|
||||
- item1:
|
||||
[...]
|
||||
|
||||
- loop:
|
||||
name: Training file demo
|
||||
action:
|
||||
- item2:
|
||||
[...]
|
||||
|
||||
- item3:
|
||||
[...]
|
||||
|
||||
[...]
|
||||
|
||||
- !include path/to/my/subtest.cpt
|
||||
|
||||
[...]
|
||||
|
||||
report:
|
||||
[...]
|
||||
\end{minted}
|
||||
\caption{A main test file}
|
||||
\end{listing}
|
||||
\end{columns}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Variable expansion \& global dictionary}
|
||||
\begin{columns}
|
||||
\column{0.5\textwidth}
|
||||
\begin{itemize}
|
||||
\item Persistence between steps
|
||||
\item Variable expansion: \incode{\$(my\_variable)}
|
||||
\begin{itemize}
|
||||
\item The \incode{my\_variable} value is taken in the global dictionary if the key exists
|
||||
\end{itemize}
|
||||
\item Accessed from python functions:
|
||||
\begin{itemize}
|
||||
\item \incode{tm.getgd}
|
||||
\item \incode{tm.setgd}
|
||||
\item \incode{tm.delgd}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\column{0.5\textwidth}
|
||||
\begin{itemize}
|
||||
\item Built-in variables:
|
||||
\begin{itemize}
|
||||
\item \incode{test\_directory}: the folder of the main cpt file
|
||||
\item \incode{test\_main\_file}: the main tum file
|
||||
\item \incode{os}: The OS used by the system (Linux or Windows)
|
||||
\item \incode{host\_name}: The hostname of the machine
|
||||
\item \incode{home}: The home directory of the user
|
||||
\item \incode{test\_outputs}: The list of the paths of the test log and test report
|
||||
\item \incode{testrun\_date}: The date when the test started YYYY-MM-DD
|
||||
\item \incode{testrun\_time}: The time when the test started HH:MM:SS
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{columns}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}[fragile]{Inline evaluation of python statements}
|
||||
\begin{columns}
|
||||
\column{0.6\textwidth}
|
||||
\begin{itemize}
|
||||
\item \incode{\$|<statement>|}
|
||||
\begin{itemize}
|
||||
\item Python evaluation of \incode{statement}
|
||||
\item Evaluated in:
|
||||
\begin{itemize}
|
||||
\item YAML config files
|
||||
\item tum files
|
||||
\item compatible with variables expansion
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\begin{itemize}
|
||||
\item Examples
|
||||
\begin{itemize}
|
||||
\item simple
|
||||
\begin{itemize}
|
||||
\item \incode{\$|\$(loop\_index)+1|}
|
||||
\end{itemize}
|
||||
\item table indexing
|
||||
\begin{itemize}
|
||||
\item \incode{\$|(\$(my\_table))[\$(loop\_index)]|}
|
||||
\end{itemize}
|
||||
\item string
|
||||
\begin{itemize}
|
||||
\item \incode{\$|"\$(video\_path)"+(\$(vstream\_formats))[0]+".mkv"|}
|
||||
\end{itemize}
|
||||
\item Random list of integers
|
||||
\begin{itemize}
|
||||
\item \incode{\$|[random.sample(range(0,8), k=4)]|}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\column{0.4\textwidth}
|
||||
\begin{listing}[H]
|
||||
\begin{minted}{yaml}
|
||||
[...]
|
||||
- loop:
|
||||
name: Test loop
|
||||
stop_on_failure: false
|
||||
iterator: $(stuff_number)
|
||||
action:
|
||||
|
||||
- json_rpc:
|
||||
name: Start a important step
|
||||
udp:
|
||||
server: $(dut_eth0_ip)
|
||||
snd_port: $(ctrl_snd_port)
|
||||
rcv_port: $(ctrl_rcv_port)
|
||||
timeout: 30
|
||||
mute: False
|
||||
action:
|
||||
- query:
|
||||
method: record.start
|
||||
params:
|
||||
- slot: $|$(loop_index) + 1|
|
||||
input: $|($(test_data))[$(loop_index)]|
|
||||
quality: medium
|
||||
[...]
|
||||
\end{minted}
|
||||
\caption{A main test file}
|
||||
\end{listing}
|
||||
\end{columns}
|
||||
\end{frame}
|
||||
|
||||
% ===== Links for documentation / code =====
|
||||
\subsection{Links for documentation / code}
|
||||
|
||||
\begin{frame}{Context}
|
||||
\begin{itemize}
|
||||
\item Corporate presentation
|
||||
\item Modular source files
|
||||
\item Git repository
|
||||
\begin{itemize}
|
||||
\item http://git.beafrancois.fr/v\_and\_v/testium
|
||||
\item Suggestion / tickets
|
||||
\end{itemize}
|
||||
\item Documentation
|
||||
\item testium validation suite
|
||||
\item Some Examples can be found:
|
||||
\begin{itemize}
|
||||
\item test-template
|
||||
\item Atlas validation
|
||||
\item Qualification
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
0
src/sections/tips.tex
Normal file
0
src/sections/tips.tex
Normal file
BIN
testium_gui.png
Normal file
BIN
testium_gui.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
Reference in New Issue
Block a user