A local test installation
This page is for app developers who want an Exponential installation of their own to develop and test against. With SQLite it needs no database server and installs in minutes.
Contents
Install
From a checkout of Exponential with its requirements met (Requirements):
./console exp:install --applyThat installs the multisite package on SQLite in eng-US with the siteaccesses site and admin and prints the
addresses and the login (Installing Exponential in one command). A
fuller development setup, with a web server and development settings, is in
Setting up a development environment.
Check the APIs
Run the three probes of Testing against a demo against your local
address. If REST answers 404, activate ezprestapi the way the guide describes
(Migrating from ezprestapiprovider):
# settings/override/site.ini.append.php
[ExtensionSettings]
ActiveExtensions[]=ezprestapiphp bin/php/ezcache.php --clear-tag=ini --allow-root-user
php bin/php/ezpgenerateautoloads.php -eThen reload PHP-FPM, or restart Velocity if it serves the site. If the remote services are missing, the same
procedure with ActiveExtensions[]=expservices applies
(Remote services and apps, section 1).
Prepare it for the app
- Content: a folder for the app with a few items of each class the app shows; give the folder a remote id the app's configuration uses (Node ids, remote ids and deep links).
- A role and a user exactly like production's integration user (Permissions for app users).
- A personal API key of that user for tests (
apikey/createin a role first) (Personal API keys for tools). - An OAuth client in Setup > oAuth admin, with the redirect address of your development back end, and
oauth/authorizefor the test users (OAuth2 authorization code flow). - An expservices token of the test user, if the app uses the remote services (expservices tokens in apps).
Reach it from a device
- The Android emulator reaches the host computer at
10.0.2.2; the iOS simulator shares the host's network, solocalhostworks there. - A real phone needs the computer's address on the local network and a server that listens on it.
- Use HTTPS as in production where the platform requires it for app traffic; a local certificate or a tunnel are the usual ways. Keep plain HTTP exceptions out of release builds.
Reset between runs
- Keep a copy of the SQLite database file after preparing it, and copy it back before a test run, so every run starts from the same content and ids.
- Or script the preparation with the remote services (
expnode::createwith fixedremote_ids) and run it after a fresh install.
Related pages
- Testing apps against Exponential
- Testing applications
- Getting started
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.