diff --git a/src/preamble.tex b/src/preamble.tex index 52c5180..24aae84 100644 --- a/src/preamble.tex +++ b/src/preamble.tex @@ -32,6 +32,8 @@ \newcommand{\incode}[1]{\texttt{\textbf{\textcolor{deepblue}{#1}}}} \newcommand{\tum}[1]{\emph{\textbf{\textcolor{orange}{#1}}}} +\newcommand{\pass}[1]{\texttt{\textbf{\textcolor{green}{#1}}}} +\newcommand{\fail}[1]{\texttt{\textbf{\textcolor{red}{#1}}}} \newcolumntype{L}{>{\raggedright\arraybackslash}X} diff --git a/src/sections/functionalities.tex b/src/sections/functionalities.tex index 81ec8bc..d0a0a38 100644 --- a/src/sections/functionalities.tex +++ b/src/sections/functionalities.tex @@ -7,15 +7,15 @@ \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 Python evaluation of the expression + \item \incode{\$(result)}: is \emph{mandatory} in the expression \item It can typically \begin{itemize} - \item Store a variable - \item Make a complex test, replacing a \incode{check} item + \item Extract the relevant data from a complex result + \item Change the type of the result + \item Simplify the result \end{itemize} \end{itemize} \item \incode{expected\_result} @@ -31,9 +31,9 @@ \end{minted} \end{frame} -\begin{frame}[fragile]{Include} +\begin{frame}[fragile]{Includes} \begin{itemize} - \item a .tum file can be included from another .tum file + \item a \incode{.tum} file can be included from another \incode{.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} @@ -106,7 +106,7 @@ main: # item test - let: name: test constants - values: + values: test: {{ item }} test_path: items/$(test) - group: diff --git a/src/sections/installation.tex b/src/sections/installation.tex index a638152..204d21e 100644 --- a/src/sections/installation.tex +++ b/src/sections/installation.tex @@ -11,11 +11,6 @@ \end{itemize} \item Automatic setup from sources \begin{itemize} - \item Create the python virtual environnement - \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{text} -python3 -m venv C:\path\to\venv -C:\path\to\venv\Scripts\activate.bat - \end{minted} \item run \incode{run.bat}, \incode{run.ps1} or \incode{run.sh} depending on your OS and command interpreter \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{text} cd C:\path\to\testium @@ -28,7 +23,13 @@ run.bat \item Manual setup from sources \begin{itemize} \item Create the python virtual environnement + \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{text} +python3 -m venv C:\path\to\venv + \end{minted} \item activate the environnement + \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{text} +C:\path\to\venv\Scripts\activate.bat + \end{minted} \item install the requirements \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{text} cd C:\path\to\testium diff --git a/src/sections/intro.tex b/src/sections/intro.tex index 890be82..8b00229 100644 --- a/src/sections/intro.tex +++ b/src/sections/intro.tex @@ -179,7 +179,7 @@ report: \end{itemize} \item Accessed from python functions: \begin{itemize} - \item \incode{tm.getgd} + \item \incode{tm.gd} \item \incode{tm.setgd} \item \incode{tm.delgd} \end{itemize} @@ -205,15 +205,15 @@ report: \begin{columns} \column{0.6\textwidth} \begin{itemize} - \item \incode{<||>} + \item \incode{<| \emph{statement} |>} \begin{itemize} - \item Python evaluation of \incode{statement} + \item Evaluation of the python \emph{statement} enclosed by \incode{<|} and \incode{|>} \item Evaluated in: \begin{itemize} \item YAML config files \item tum files - \item compatible with variables expansion \end{itemize} + \item compatible with variables expansion \end{itemize} \end{itemize} \column{0.4\textwidth} diff --git a/src/sections/items.tex b/src/sections/items.tex index 449abdc..c88161f 100644 --- a/src/sections/items.tex +++ b/src/sections/items.tex @@ -61,6 +61,7 @@ \item \incode{condition} : If \incode{true}, will execute the test step. Otherwise, the test step is skipped \item \incode{process\_result} : Processes the result \item \incode{expected\_result} : Expected result of the item + \item \incode{no\_fail} : If \incode{true}, forces the step result to be \pass{PASS} \end{itemize} \end{itemize} \end{frame} @@ -70,15 +71,15 @@ \begin{itemize} \item for all test items \begin{itemize} - \item \incode{last\_test\_result} : contains the result of the step + \item \incode{last\_step\_result} : contains the last test step result \begin{itemize} \item if no result returned by the test - \item \incode{PASS}, \incode{FAIL} or \incode{SKIPPED} + \item \pass{PASS}, \fail{FAIL} or \incode{SKIPPED} \end{itemize} \item \incode{ts\_start\_} : The timestamp at the beginning of the item name \item \incode{ts\_end\_} : The timestamp at the beginning of the item name \end{itemize} - \item console test item specific variables + \item \incode{console} test item specific variables \begin{itemize} \item \incode{cn\_} : Containing the last data which has been read in the console \end{itemize} @@ -90,7 +91,7 @@ \begin{itemize} \item \incode{lfn\_} : The returned value of the last \incode{lua\_func} test item execution \end{itemize} - \item loop test item specific variables + \item \incode{loop} test item specific variables \begin{itemize} \item \incode{loop\_index} : loop index (starting from 0) \item \incode{loop\_param} : current value of the loop iterator @@ -107,10 +108,10 @@ \begin{itemize} \item \incode{open} : Open a console using the specified protocol \begin{itemize} - \item \incode{Telnet} + \item \incode{telnet} \item \incode{ssh} - \item \incode{Serial} - \item \incode{rawTcp} + \item \incode{serial} + \item \incode{rawtcp} \item \incode{terminal} \end{itemize} \item \incode{close} : Close the console @@ -119,8 +120,8 @@ \item \incode{read\_until} : Read until an expected string \begin{itemize} \item \incode{expected} : The expected string to be received - \item \incode{timeout} : The timeout to read the expected until it fails - \item \incode{no\_fail} : Do not fail even if a timeout occurs + \item \incode{timeout} : The timeout to read the expected until it \fail{FAIL}s + \item \incode{no\_fail} : Do not \fail{FAIL} even if a timeout occurs \end{itemize} \end{itemize} \column{0.4\textwidth} @@ -178,7 +179,7 @@ def dummy_func(param1, param2, param4, param4): return 10 \end{minted} \begin{itemize} - \item To get a variable from the global dictionnary : \incode{tm.getgd("global\_dict\_key")} + \item To get a variable from the global dictionnary : \incode{tm.gd("global\_dict\_key")} \item To set a variable from the global dictionnary : \incode{tm.setgd("global\_dict\_key", value)} \end{itemize} \end{itemize} @@ -191,7 +192,7 @@ def dummy_func(param1, param2, param4, param4): tm = require("testium") \end{minted} \begin{itemize} - \item To get a variable from the global dictionnary : \incode{tm.getgd("global\_dict\_key")} + \item To get a variable from the global dictionnary : \incode{tm.gd("global\_dict\_key")} \item To set a variable from the global dictionnary : \incode{tm.setgd("global\_dict\_key", value)} \end{itemize} \end{itemize} @@ -267,7 +268,7 @@ tm = require("testium") \item Available dialogs are: \begin{itemize} \item \incode{dialog\_message} : Display a message to the operator - \item \incode{dialog\_question} : Ask a question and FAIL if the answer is no + \item \incode{dialog\_question} : Ask a question and \fail{FAIL} if the answer is no \item \incode{dialog\_note} : The operator can write a small note \item \incode{dialog\_value} : The operator enter a value \item \incode{dialog\_references}: Ask for the reference, revision and serial number @@ -295,13 +296,13 @@ tm = require("testium") \begin{frame}[fragile]{\incode{check} test item} \begin{itemize} - \item A simple test item returning fail if one of its \incode{values} is \incode{false} + \item A simple test item returning \fail{FAIL} if one of its \incode{values} is \incode{false} \begin{minted}[fontsize=\fontsize{6}{7}\selectfont]{yaml} - check: name: check test item example values: - True - - <|$(last_test_result) == 3|> + - <|$(last_step_result) == 3|> - <|"my string" in "$(my_global_variable)"|> \end{minted} \end{itemize} diff --git a/testium_training.pdf b/testium_training.pdf index a1ccba5..421420c 100644 Binary files a/testium_training.pdf and b/testium_training.pdf differ