Testing

Uit Petities
Versie door Rrr (Overleg | bijdragen) op 23 jul 2011 om 09:48 (how to test locally)

(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Ga naar: navigatie, zoeken

Testing the petities.nl code on your own machine

Assuming your configuration meets the requirements do the following:

Search-engine

To start up the search-engine:

  • Start a Terminal
  • Navigate to the directory with the application. Assuming you installed it in your home-directory this will be "cd ~/Rails/petities.nl/"
  • Start the search-engine with the command "rake ts:start"
  • You can eventually stop the search-engine with the command "rake ts:stop"

Job-worker

The job-worker performs background tasks like sending out e-mails. To get an overview of all the jobs in the queue go to http://petities.local/admin/jobs . When you see records of jobs queued for execution there or when you expect a mail from the system, start the job-worker to have these jobs processed.

  • Start a Terminal
  • Navigate to the directory with the application. Assuming you installed it in your home-directory this will be "cd ~/Rails/petities.nl/"
  • Start the job-worker with the command "rake jobs:work"
  • You can eventually stop the job-worker with the keystroke ctrl-c

Mailcatcher

The site sends out all kinds of e-mails in many stages. It would be inconvenient to have those e-mails actually leave your system to a mailserver. Before the e-mails leave the system you can catch them using Mailcatcher. You can then see the e-mails using a webbrowser pointed at the local IP-address where Mailcatcher runs, mentioned just after startup. You can quit Mailcatcher in that webinterface.

  • Start a Terminal
  • Navigate to the directory with the application. Assuming you installed it in your home-directory this will be "cd ~/Rails/petities.nl/"
  • Start Mailcatcher with the command "mailcatcher"