Code Monkey home page Code Monkey logo

cie-assessment's Introduction

Overview

This is a very basic configuration with minimal extra libraries to help demonstrate the valid login scenario from the technical assessment (โ€”as well as some additional cases, like test cases from the manual part of the assessment & an example of an assertion failure.)

A quick reproduction of the screen from the manual assessment can be found here and is used as the destination for the end-to-end testing in this repo. (The manual part of this assessment can also be found as a PDF in the manual subfolder.)

Assumption

  • chromedriver for your local version of Chrome is already installed & added to PATH.

Usage

A test run can be observed by pulling down the repo & running:

python -m suites.login_suite

At the start of each run, the screenshots folder is scrubbed in preparation of the next suite execution. After each test case, a screenshot of the test case result is taken as part of the tearDown step.

Some sample output (including the intentional-fail test case):

======================================================================
FAIL: test_wrong_notification_message_displayed (tests.test_login.SignInPageTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Raftacon\Desktop\cie\tests\test_login.py", line 50, in test_wrong_notification_message_displayed
    self.page.assert_notification_text(TestData.NOTIFICATION_TEXT_SUCCESS)
  File "C:\Users\Raftacon\Desktop\cie\pages.py", line 35, in assert_notification_text
    self.assert_text_match(SignInPageLocators.RESULT_NOTIFICATION, text)
  File "C:\Users\Raftacon\Desktop\cie\pages.py", line 20, in assert_text_match
    assert (element.text == text), \
AssertionError:
Element value:  "Login failed, please try again."
Desired text:   "Login successful!"

----------------------------------------------------------------------
Ran 6 tests in 30.450s

FAILED (failures=1)

Future Improvements:

  • Implement configuration to easily cycle Selenium targets between Chrome, Firefox, etc.
  • Either roll own template or find a better library to prettify results.

cie-assessment's People

Contributors

raftacon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.