Hi all, do you know how I can mark a Test Case as not counted as a Test or are there any Preparation Steps anyhow in Robot Framework ?
*** Settings ***
Library Libraries/LibArtifacts.py
Library Dialogs
*** Test Cases ***
Collect Credentials
${user}= Get Value from User User
Set global Variable ${user}
${pw}= Get Value from User Passwort hidden=True
Set global Variable ${pw}
Test downloading valid Artifact
${result}= Download Artifact ArtTest 8.1.6 ${user} ${pw}
Should not be equal ${result} Failed
Test downloading invalid Artifact
Run Keyword and expect Error File not found Download Artifact ArtTest 0.0.0 ${user} ${pw}
This is the Code I am working on and I don’t want Collect Credentials to be a Test, it’s just a preparing Step.
*** Settings ***
Library Libraries/LibArtifacts.py
Suite Setup Collect Credentials
*** Test Cases ***
Test downloading valid Artifact
${result}= Download Artifact ArtTest 8.1.6 ${user} ${pw}
Should not be equal ${result} Failed
Test downloading invalid Artifact
Run Keyword and expect Error File not found Download Artifact ArtTest 0.0.0 ${user} ${pw}
*** Keywords ***
Collect Credentials
${user}= collectUser
Set Suite Variable ${user}
${pw}= collectPW
Set Suite Variable ${pw}
Libraries/LibArtifacts.py
import sys
sys.path.append('../../../')
import Artifacts
from robot.api import logger
import getpass
import platform
if platform.system() == 'Darwin':
osystem = 'mac'
if platform.system() == 'Linux':
osystem = 'linux'
if platform.system() == 'Windows':
osystem = 'win'
def collectUser():
logger.console('Use `%s` as User'%(getpass.getuser()))
return getpass.getuser()
def collectPW():
return getpass.getpass('Password: ')