-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start
This page contains instruction required to install and configure GodelTech.StoryLine and test REST service.
Two NuGet packages needs to be installed in order to implement test scenarios for REST service:
- GodelTech.StoryLine package which contains core functionality of framework.
- GodelTech.StoryLine.Rest package which contains REST-specific actions and expectations.
GodelTech.StoryLine package doesn't require any configuration. The only configuration is required for GodelTech.StoryLine.Rest. The following lines must be executed once for your test pack execution.
GodelTech.StoryLine.Rest.Config.AddServiceEndpont("MyService", "http://localhost:1234/");
GodelTech.StoryLine.Rest.Config.SetAssemblies(typeof(Config).GetTypeInfo().Assembly);If you are using NUnit this code can be placed in class decorated with SetUpFixture attribute. If XUnit is used this code can be located in passed as parameter to ICollectionFixture<T> implementation.
You may find detailed information regarding GodelTech.StoryLine.Rest on the following page.
Put the following lines inside you test case (e.g. method decorated either with Test or Fact attributes).
Scenario.New()
.When()
.Performs<HttpRequest>(x => x
.Method("GET")
.Url("/swagger/v1/swagger.json"))
.Then()
.Expects<HttpResponse>(x => x
.Status(HttpStatusCode.OK))
.Run();