Personal website of Wojciech Koszek
Website is tested with Capybara, which uses Selenium as a testing framework.
To obtain interesting/visible links, I use
linkchecker. It also warns me
about incorrect links, if any. The feedback from
linkchecker is then used
to do some browser-based tests. Currently I use RSpec script from
visit the links and see if they have some content I'd expect (title, menu,
unrendered HTML). If those assertions fail, the whole website build fails
Gemfile for details.
Install following programs to save yourself a hassle later:
sudo brew update sudo brew install qt advancecomp gifsicle jhead jpegoptim jpeg optipng pngcrush pngquant sudo brew install nginx linkchecker apt-get install ruby1.9.1-dev sudo gem install middleman sudo gem install capybara sudo pip install linkchecker gem install bundle bundle install
The last comment will get Bundler to install dependencies for you.
How to use this project
Everything is driven by a
makefile and performing calls to
understand what each command does, take a look at the
To start the local server and get a local preview of the project, type:
After this test Middleman will print the URL to access on the standard output. You can access it with your browser, and any changes should result in an automatic refresh.
To render the whole website to
build/ directory type:
How to test
To test you must have a
nginx installed. Testing is provided with
Selenium. You should be able to do:
- start nginx HTTP server for you
- do a link testing with
- do a test with Selenium accessing discovered links