Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ There are two different options for debugging a Flask project:
1. Run `python manage.py runserver` to start a native Flask development server. This comes with the Werkzeug stack-trace debugger, which will present runtime failure stack-traces in-browser with the ability to inspect objects at any point in the trace. For more information, see [Werkzeug documentation](http://werkzeug.pocoo.org/).
2. Run `python manage.py debug` to run a Flask development server with debug exposed, but the native debugger/reloader turned off. This grants access for an IDE to attach itself to the process (i.e. in PyCharm, use `Run` -> `Attach to Local Process`).

Note for Windows users: `gunicorn` is not supported on Windows. You may start the server with `python manage.py run` on your local machine or build and start the Dockerfile.
You can also verify the state of your locally running application using the Selenium UI test script included in the `scripts` directory.

> **Note for Windows users:** `gunicorn` is not supported on Windows. You may start the server with `python manage.py run` on your local machine or build and start the Dockerfile.

#### IBM Cloud Developer Tools

Expand Down
17 changes: 17 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#### Experience Testing

This application includes a UI test for the application experience written in Python, using Selenium, that you can extend as you further develop your application.

To run the experience test, first you need to [install Python](https://www.python.org/downloads/) on your system.

Then install selenium.
```bash
pip install selenium
```
[Set up the Chrome WebDriver](https://chromedriver.chromium.org/getting-started) on your system, you will also need to install the [Chrome Browser](https://www.google.com/chrome/) if you do not have it. If you prefer, you can update the experience test experience_test.py to use the [Firefox WebDriver](https://developer.mozilla.org/en-US/docs/Web/WebDriver). Make sure that you have added the driver to your system PATH.

With the application running locally, export the necessary environment variables, and run the Python web experience test in this directory.
```bash
export APP_URL=https://localhost:3000 # default value for the local application
python3 experience_test.py
```
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/experience_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ echo "Installing Selenium Python package..."
pip install selenium

echo "Running UI test using Selenium..."
python3 python_flask.py
python3 experience_test.py