aggregate icon indicating copy to clipboard operation
aggregate copied to clipboard

Define a process to reproduce different user scenarios for testing

Open ggalmazor opened this issue 6 years ago • 1 comments

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:
    1. Stop Tomcat
    2. Download the database dump odk_v1.sql.zip
    3. 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.
    4. Prepare the database with:
      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"`
      
      (use the correct path to the SQL file from the previous step)
    5. Configure Aggregate to run with the odk database, the odk user, and the odk_v1 schema. Edit the jdbc.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
      
    6. Start Tomcat

ggalmazor avatar Jan 17 '19 07:01 ggalmazor

@kkrawczyk123, you tried this during the last QA round. Any feedback about the process?

ggalmazor avatar Jan 29 '19 15:01 ggalmazor