various fixes

This commit is contained in:
2026-02-14 23:52:11 +01:00
parent 9a1591ce65
commit 0d7d30be3d
6 changed files with 35 additions and 31 deletions

View File

@@ -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}