Skip to content

A minimal blog application in Flask enhanced with Sauce Labs and Travis CI test harness

Notifications You must be signed in to change notification settings

gitter-badger/flask-webdriver-demo

 
 

Repository files navigation

Flaskr - a minimal blog application with extra Sauce Sauce Test Status Build Status

Sauce Test Status

What is Flaskr?

A sqlite powered thumble blog application based on Flask.

Installation

Clone the repo first

$ git clone git@github.com:christian-bromann/flask-webdriver-demo.git
$ cd flask-webdriver-demo

Virtualenv is probably what you want to use during development, and if you have shell access to your production machines, you’ll probably want to use it there, too.

$ sudo easy_install virtualenv

or

sudo pip install virtualenv

Now, whenever you want to work on a project, you only have to activate the corresponding environment. On OS X and Linux, do the following:

. venv/bin/activate

Then install all requirements:

$ pip install -r requirements.txt

Run app

If you start the application for the first time, you need to initialise the database first:

$ python init_db.py

Run the app by using the Flask CLI

$ flask --app=flaskr run

Run tests

Replace the existing Sauce Labs credentials in the .travis.yml with yours by executing

$ travis encrypt SAUCE_USERNAME=YOUR_USERNAME --add
$ travis encrypt SAUCE_ACCESS_KEY=YOUR_ACCESS_KEY --add

Make sure that your Sauce credentials are available as environment variables in your terminal, run the following command:

echo "export SAUCE_USERNAME=YOUR_USERNAME
export SAUCE_ACCESS_KEY=YOUR_ACCESS_KEY" >> ~/.bash_profile &&
source ~/.bash_profile

Download and run Sauce Connect. After that start the test by executing:

$ ./test.sh

About

A minimal blog application in Flask enhanced with Sauce Labs and Travis CI test harness

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 78.1%
  • HTML 11.8%
  • CSS 6.9%
  • Shell 3.2%