Integration testing not finding UmbracoApiControll...
# help-with-umbraco
c
I have followed the docs and setup a testing project, with a
UmbracoTestServerBase
test class https://docs.umbraco.com/umbraco-cms/implementation/integration-testing#testing-from-controller-to-database, there's a
UmbracoApiController
that I wanted to run an integration test on, following the docs, I wrote:
Copy code
c#
[TestFixture]
[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)]
public class CustomApiControllerTest: UmbracoTestServerTestBase
{
  [Test]
  public async Task EnsureSuccessStatusCode()
  {
    var url = PrepareApiControllerUrl<CustomApiController>(x => x.Get());
    var response = await Client.GetAsync(url);
    Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.OK));
  }
}
The
Get()
endpoint just returns
Ok()
, however I am repeatedly getting a 404 not found error, running the test in debug mode, it doesn't appear that the controller endpoint is being hit at all, is there some steps required for UmbracoTestServerTestBase to find the controllers in a project?
2 Views