Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

equinor/sepes-api

Repository files navigation

This repository is archived due to Sepes being decomissioned and as of Q2 2023 not in production.

sepes-api

Unit Tests CodeQL badge

A platform that allows vendors prove their solutions on your data in a sandbox

Making commits

Use conventional commits as described in https://github.com/equinor/sdscoredev-handbook#git-commits

Valid scope-s for Sepes are:

  • study
  • sandbox
  • dataset

Setup local dev environment

TODO: Fix this, old guide is gone

Tests

The project Sepes.Tests contains Unit Tests, and the Sepes.RestApi.IntegrationTests contains the Integration Tests xUnit is used as test framework. For Integration tests, WebApplicationFactory is used, calling the Api Controllers and their dependencies through actual HTTP requests.

How to run tests

Prerequisites

  • Integration tests uses a SQL database, and it should NOT be the same as the development database, because it will be wiped before every test run.
    • There is currently a bug, that requires one to specify the connection string for the integration test database, in both Sepes.RestApi and Sepes.RestApi.IntegrationTests
    • Use the config key: ConnectionStrings:SqlDatabaseIntegrationTests to specify the connectionString for the Integration test database.

Best option: Run from Visual Studio

Open the "Test Explorer"-Window and click the "Run All Tests In View".

Console

  • To run both unit and integration tests, navigate to the solution folder and run the "dotnet test" command from there
  • To run only unit tests or integration tests, navigate to their respective project folder and run "dotnet test"

How to generate test coverage report

Go to the solution folder and run the testcoverage.bat file. It will produce a coverage file and open it in the browser.

Commitizen friendly

About

A platform that allows vendors to prove their solutions on your data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages