Christopher Armstrong
Christopher Armstrong

Reputation: 3557

Testing in Aqueduct 3.0 Pre-Release

I have a hard time figuring out how to test in Aqueduct 3.0 Pre-Release.

I see an example in the Snippets section of the documentation that uses following to connect to an endpoint:

app.client.request("/endpoint").get()

But when I look at the example_test.dart it looks following:

harness.agent.get("/places")

So it seems that there were some changes.

In the "Writing Tests" section of the documentation I can't figure out, into which files or classes the code snippets go.

Also it took me quite a long time to figure out how to run tests:

dart test/example_dart.test

I was searching for "aqueduct test" or something similar.

Is there some more documentation, or a full code example, how to setup a test environment and write tests in 3.0 Pre-Release (with get, put, post, delete)?

Upvotes: 0

Views: 78

Answers (1)

Joe Conway
Joe Conway

Reputation: 1586

The published documentation site is lagging behind, but the documentation has been written. The markdown is available here: https://github.com/stablekernel/aqueduct/blob/docs/3.0/source/docs/testing/tests.md.

It is also worthwhile to install look at the tests in the template projects, especially the larger templates: ‘aqueduct create -t db_and_auth projectname’.

Upvotes: 1

Related Questions