How to use register_job_options method in avocado

Best Python code snippet using avocado_python

job.py

Source:job.py Github

copy

Full Screen

...35from .settings import settings36from .suite import TestSuite, TestSuiteError37from .utils import get_avocado_git_version38_NEW_ISSUE_LINK = 'https://github.com/avocado-framework/avocado/issues/new'39def register_job_options():40 """Register the few core options that the support the job operation."""41 msg = (42 "Sets the base log level of the output generated by the job, which "43 "is also the base loging level for the --show command line option. "44 "Any of the Python logging levels names are allowed here. Examples:"45 " DEBUG, INFO, WARNING, ERROR, CRITICAL. For more information refer"46 " to: https://docs.python.org/3/library/logging.html#levels"47 )48 settings.register_option(section='job.output',49 key='loglevel',50 default='DEBUG',51 help_msg=msg)52 help_msg = ('Set the maximum amount of time (in SECONDS) that tests are '53 'allowed to execute. Values <= zero means "no timeout". You '54 'can also use suffixes, like: s (seconds), m (minutes), h '55 '(hours). ')56 settings.register_option(section='job.run',57 key='timeout',58 default=0,59 key_type=time_to_seconds,60 help_msg=help_msg)61register_job_options()62class Job:63 """A Job is a set of operations performed on a test machine.64 Most of the time, we are interested in simply running tests,65 along with setup operations and event recording.66 A job has multiple test suites attached to it. Please keep in mind that67 when creating jobs from the constructor (`Job()`), we are assuming that you68 would like to have control of the test suites and you are going to build69 your own TestSuites.70 If you would like any help to create the job's test_suites from the config71 provided, please use `Job.from_config()` method and we are going to do our72 best to create the test suites.73 So, basically, as described we have two "main ways" to create a job:74 1. Automatic discovery, using `from_config()` method::75 job = Job.from_config(job_config=job_config,...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run avocado automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful