SeleniumBase/help_docs/mysql_installation.md

1.5 KiB
Executable File

MySQL Installation Instructions

MySQL (OPTIONAL)

(NOTE: If you're using this test framework from a local development machine and don't plan on writing to a MySQL DB from your local test runs, you can skip this step.)

Mac:

brew install MySQL

Windows: Download MySQL here

That installs the MySQL library so that you can use database commands in your code. To make that useful, you'll want to have a MySQL DB that you can connect to.

Access your MySQL DB

If you want a visual tool to help make your MySQL life easier, try MySQL Workbench.

Prepare your MySQL DB

You can use the testcaserepository.sql file to create the necessary tables for storing test data.

If you were able to successfully install MySQL, you can now install the remaining MySQL requirements:

pip install -r server_requirements.txt

Configure your MySQL DB for SeleniumBase

You'll want to update your settings.py file with your MySQL DB credentials so that tests can write to the database when they run.

Allow tests to write to your MySQL database

Add the --with-db_reporting argument on the command line when you want tests to write to your MySQL database. Example:

nosetests my_first_test.py --with-selenium --with-db_reporting