Local process Plugin - Assert Macros¶
Contents :
# ASSERT {result} IS FAILURE WITH EXIT CODE {exitCode}¶
What ?
This macro will verify that the result of a failed execution command contains the expected exit code.
Underlying instruction :
ASSERT {result} IS failure WITH $({exitCode})
> Input :
{result}: The resource file that contains the result of a shell execution command (result.shelltype resource).{exitCode}: The expected return code of the command execution.
Example :
# ASSERT result IS failure WITH exit code 2 SKF script :
![]()
Console output :
![]()
# ASSERT {result} STDOUT CONTAINS {regex}¶
What ?
This macro will verify that the standard outflow resulting of a shell command execution contains a specific character string.
Underlying instruction :
ASSERT {result} DOES contain WITH $({regex}) USING $(out)
> Input :
{result}: The resource file that contains the result of a shell execution command (result.shelltype resource).{regex}: The searched character string.
Example :
# ASSERT result STDOUT CONTAINS hello world SKF script :
![]()
# ASSERT {result} STDOUT DOES NOT CONTAIN {regex}¶
What ?
This macro will verify that the standard outflow resulting of a shell command execution does not contain a specific character string.
Underlying instruction :
ASSERT {result} DOES not.contain WITH $({regex}) USING $(out)
> Input :
{result}: The resource file that contains the result of a shell execution command (result.shelltype resource).{regex}: The searched character string.
Example :
# ASSERT result STDOUT DOES NOT CONTAIN hello world SKF script :
![]()
Console output :
![]()
# ASSERT {result} STDERR CONTAINS {regex}¶
What ?
This macro will verify that the error outflow resulting of a shell command execution contains a specific character string.
Underlying instruction :
ASSERT {result} DOES contain WITH $({regex}) USING $(err)
> Input :
{result}: The resource file that contains the result of a shell execution command (result.shelltype resource).{regex}: The searched character string.
Example :
# ASSERT result STDERR CONTAINS Fichier introuvable SKF script :
![]()
# ASSERT {result} STDERR DOES NOT CONTAIN {regex}¶
What ?
This macro will verify that the error outflow resulting of a shell command execution does not contain a specific character string.
Underlying instruction :
ASSERT {result} DOES not.contain WITH $({regex}) USING $(err)
> Input :
{result}: The resource file that contains the result of a shell execution command (result.shelltype resource).{regex}: The searched character string.
Example :
# ASSERT result STDERR DOES NOT CONTAIN Fichier introuvable SKF script :
![]()
Console output :
![]()