Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 1a89c4b

Browse files
committed
experience test readme and refactor
1 parent dc21312 commit 1a89c4b

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ There are two different options for debugging a Flask project:
8080
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/).
8181
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`).
8282

83+
You can also verify the state of your locally running application using the Selenium UI test script included in the scripts/ directory.
84+
8385
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.
8486

8587
#### IBM Cloud Developer Tools

scripts/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#### Experience Testing
2+
3+
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.
4+
5+
To run the experience test, first you need to [install Python](https://www.python.org/downloads/) on your system.
6+
7+
Then install selenium.
8+
```bash
9+
pip install selenium
10+
```
11+
[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.
12+
13+
With the application running locally, export the necessary environment variables, and run the Python web experience test in this directory.
14+
```bash
15+
export APP_URL=https://localhost:3000 # default value for the local application
16+
python3 experience_test.py
17+
```
File renamed without changes.

scripts/experience_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ echo "Installing Selenium Python package..."
1515
pip install selenium
1616

1717
echo "Running UI test using Selenium..."
18-
python3 python_flask.py
18+
python3 experience_test.py

0 commit comments

Comments
 (0)