aggregate
aggregate copied to clipboard
Define a process to reproduce different user scenarios for testing
We need an automated and reproducible way to set different scenarios for testing purposes. For example, for the upcoming v2.0.0 release, we need to test a scenario where a user might upgrade from v1.x with ODK Tables enabled, google account credentials, and a form with temporal fields and data.
This process should be based on database dumps that could be restored, and launching Aggregate with a database configuration that uses them.
Scenario 1: User upgrades from v1.x to v2.x
This scenario setup is for PostgreSQL 9 or greater
- Instructions:
- Stop Tomcat
- Download the database dump odk_v1.sql.zip
- Unzip the dump file. You will get an
odk_v1.sql
file. Take note of the path where the unzipped SQL file is at for the next set of commands. - Prepare the database with:
(use the correct path to the SQL file from the previous step)sudo su postgres -c "psql -c \"CREATE USER odk LOGIN PASSWORD 'odk'\"" sudo su postgres -c "psql -c \"CREATE DATABASE odk OWNER odk\"" sudo su postgres -c "psql -c \"DROP SCHEMA IF EXISTS odk\" odk\" sudo su postgres -c "psql -f /path/to/odk_v1.sql odk"`
- Configure Aggregate to run with the
odk
database, theodk
user, and theodk_v1
schema. Edit thejdbc.properties
file:jdbc.driverClassName=org.postgresql.Driver jdbc.resourceName=jdbc/odk_aggregate jdbc.url=jdbc:postgresql://127.0.0.1/odk?autoDeserialize=true jdbc.username=odk jdbc.password=odk jdbc.schema=odk_v1
- Start Tomcat
@kkrawczyk123, you tried this during the last QA round. Any feedback about the process?