November 2018
Intermediate to advanced
404 pages
10h 16m
English
Writing tests for server-side Swift projects starting with the Kitura framework will be the same as what you've just learned with the Vapor framework, since both Kitura and Vapor use the same XCTest framework.
If you check out the boilerplate project created with kitura init, you will find more tests there. The first test, testGetStatic, shows you how to test a Kitura server running static content. The second test, testHealthRoute, demonstrates how to test the probing results of health on a Kitura server instance:

Now open the RouteTests.swift file, and you will see a typical XCTestCase implementation:
Read now
Unlock full access