various fixes
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{<|<statement>|>}
|
||||
\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}
|
||||
|
||||
@@ -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\_<item\_name>} : The timestamp at the beginning of the item name
|
||||
\item \incode{ts\_end\_<item\_name>} : 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\_<item\_name>} : Containing the last data which has been read in the console
|
||||
\end{itemize}
|
||||
@@ -90,7 +91,7 @@
|
||||
\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
|
||||
\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}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user