diff --git a/behave.ini b/behave.ini index e69de29..7909dc5 100644 --- a/behave.ini +++ b/behave.ini @@ -0,0 +1,12 @@ +[behave] +default_format = pretty +show_skipped = false +show_timings = true +stdout_capture = yes +logging-level=ERROR + +[behave.userdata] +browser=chrome +name = gmgauthier@protonmail.com +platform = OSX + diff --git a/harness/conftest.py b/conftest.py similarity index 100% rename from harness/conftest.py rename to conftest.py diff --git a/features/demo.feature b/features/demo.feature deleted file mode 100644 index 301863b..0000000 --- a/features/demo.feature +++ /dev/null @@ -1,5 +0,0 @@ -Feature: Demo Feature - Scenario: Demo - Given A sentence - When The sentence is inspected - Then The word "the" should be found diff --git a/features/environment.py b/features/environment.py index e69de29..4c9fe1c 100644 --- a/features/environment.py +++ b/features/environment.py @@ -0,0 +1,7 @@ +def before_all(context): + # -- SET LOG LEVEL: behave --logging-level=ERROR ... + # on behave command-line or in "behave.ini". + context.config.setup_logging() + + # -- ALTERNATIVE: Setup logging with a configuration file. + # context.config.setup_logging(configfile="behave_logging.ini") \ No newline at end of file diff --git a/features/steps/browser_demo.py b/features/steps/browser_demo.py index ba78978..18bde55 100644 --- a/features/steps/browser_demo.py +++ b/features/steps/browser_demo.py @@ -11,7 +11,7 @@ def step_impl(context): @when('I navigate to test.io') def step_impl(context): context.driver.get("https://test.io") - + print(context.driver.title) @then('The page is displayed') def step_impl(context): diff --git a/features/steps/demo.py b/features/steps/demo.py deleted file mode 100644 index fa0a475..0000000 --- a/features/steps/demo.py +++ /dev/null @@ -1,16 +0,0 @@ -from behave import then, when, given - - -@given('A sentence') -def step_impl(context): - return True - - -@when('The sentence is inspected') -def step_impl(context): - return True - - -@then('The word "the" should be found') -def step_impl(context): - return True diff --git a/harness/__init__.py b/harness/__init__.py deleted file mode 100755 index e69de29..0000000