NewCircleMovement / tinkuy

0 stars 0 forks source link

Stories in Ready Build Status Code Climate Gemnasium

Website for tinkuy.dk.

How to build

start

Testing

There are automated tests, with support for continuous integration through travis.ci. We have two kinds of tests at the moment: unit testing and functional testing

Unit-testing

We are just using rake test which comes built in with ruby. Unfortunately it is a bit out of date, and thus all tests are disabled at the moment; test/fixtures, test/controllers, etc. needs to be updated before this makes sense.

Functional testing

Currently we just start the rails server, fetch some pages, and compare them with what we expect. This is executed by running test2/run-blackbox-testing.sh in the project root, which then reinitialises the tinkuy_test database, starts rails server, fetches a number of webpages into test2/result, and compares that with the expected value in test2/expected. Important: when changes are done that affects the outpage of the pages, this test will likely fail, - verify that the behaviour is as expected, and then move the content of test2/result into test2/expected.

This is just a quick hack to be able to test, if the application runs, and has the expected output. On the long run, it would make sense to replace this with a selenium tests, or similar.

Sample data

There is an sample database in test2/sample-db.pgsql.xz. All user information has been anonymised, and every user has the password 12345678. Some user logins with different roles are:

Migrating sample database

When there are changes in schema, then the sample database needs to be migrated: first load database, then migrate, and then store the new one, ie.:

Deploy

git@heroku.com:tinkuy-staging.git