Skip to content

Fix the issues in this repo and make the program work.

License

Notifications You must be signed in to change notification settings

qxf2/makemework

Repository files navigation

Make me work!

Fix the issues in this repo and make this program work. This repository is aimed at folks who have already learnt to write basic Python but are looking for more realistic challenges that involve reading a large enough codebase, exploring file structures and making changes to an existing codebase.

The code you are going to run is a Selenium test for the Weather Shopper application. The automated test itself completes the weather shopper exercise. Your job is to fix the problems in the automated test and make it run successfully.

Setup

  1. This codebase uses Python 3.10.0
  2. Fork this repository
  3. Clone your forked repository
  4. Create a virtualenv and activate it
  5. pip install -r requirements.txt
  6. Install Chrome driver. If you don't know how to, please try:

    Chrome driver

  7. Run the test using the command pytest -k e2e

The setup instructions are intentionally high-level since this repository is aimed at people with people who have already written Python before. If you are beginner, you will find our other repository a better place to start.

Your assignment

The weather shopper exercise has been partially completed using the code provided to you. Your assignment is to:

  1. fix the errors in the existing code
  2. complete the exercise on the payment page
  3. use the same design patterns and programming style when solving the exercises

How to proceed?

  1. Run the test using the command pytest -k e2e
  2. Observe, debug and fix the error
  3. Test your fix
  4. Commit your change and push
  5. Repeat steps 1-4 for the next error

Example working test

If you fix all the bugs in this code, your test should perform like the gif below:

Remember, you should not stop at just fixing the existing code. You should also complete the instructions on the cart page too!

Debugging tips

Here are some useful debugging tips that do not involve the use of debugger:

  1. Search for strings in all files
  2. Search for sub-strings in all files if the exact string does not exist
  3. F12 to follow the definition of a method in Visual Studio Code
  4. Add debug messages to figure out the flow
  5. if True: trick (to get exact error messages, in the test, replace try: with if True: and comment out the except portion)
  6. Read the log messages backwards
  7. Sometimes the error happens in the line before the failure!

Notes

  1. Use Python 3.10.0
  2. We recommend using Visual Studio code as your IDE
  3. We recomment using a virtualenv
  4. You need to have Chrome driver installed

About

This repository is created and maintained by Qxf2 Services. Qxf2 provides software testing services for startups. If your team is working on an early stage product and needs QA, you can hire Qxf2 Services to help. Contact Arun at [email protected]

Releases

No releases published

Packages

No packages published

Languages