Jon M Venstad
Jon M Venstad
Senior Vespa Engineer
Håkon Hallingstad
Håkon Hallingstad
Principal Vespa Engineer

Basic HTTP testing of Vespa applications

HTTP interfaces are the bread and butter for interacting with a Vespa application. A typical system test of a Vespa application consists of a sequence of HTTP requests, and corresponding assertions on the HTTP responses.

The latest addition to the Vespa CLI is the test command, which makes it easy to develop and run basic HTTP tests, expressed in JSON format. Like the document and query commands, endpoint discovery and authentication are handled by the CLI, leaving developers free to focus on the tests themselves.

Basic HTTP tests are also supported by the CD framework of Vespa Cloud, allowing applications to be safely, and easily, deployed to production.

Developing and running tests

To get started with Vespa’s basic HTTP tests:

  • Install and configure Vespa CLI
  • Clone the album-recommendation sample app
    vespa clone vespa-cloud/album-recommendation myapp
  • Configure and deploy the application, locally or to the cloud
    vespa deploy --wait 600
  • Run the system tests, or staging setup and tests
    vespa test src/test/application/system-test
  • To enter production in Vespa Cloud, modify the tests, and then
    vespa prod submit

For more information, see the reference documentation: Basic HTTP Testing.