Skip to content
Louis-Axel Ambroise edited this page Mar 25, 2020 · 12 revisions

Installation

FasTnT EPCIS repository can be setup easily simply by following a few steps:

Prerequisites

FasTnT EPCIS relies on .NET Core 3.1 and PostgreSQL 9.5 or newer. You'll need to create a new user/database for the EPCIS repository on your PostgreSQL server.

Setup

Setup FasTnT EPCIS repository is as easy as following these 4 steps:

  1. Clone the solution or download the latest release code, and open a terminal on the root folder;
  2. Update the connection string: $dotnet user-secrets set ConnectionStrings:FasTnT.Database "{your connectionstring}" -p src\FasTnT.Host\FasTnT.Host.csproj;
  3. Start the repository with the command $dotnet run -p src\FasTnT.Host\FasTnT.Host.csproj --urls "http://localhost:5102/";
  4. Create the SQL schemas and tables: $curl -X POST http://localhost:5102/EpcisServices/1.2/Database/Migrate;

That's it! You have a properly working EPCIS 1.2 repository running locally.

Tests

To ensure the correct implementation of the EPCIS specification, the code base contains both unit and integration tests that you can run at any time.

To properly run integration tests, you need to setup a new database in PostgreSQL and configure the connection string in the user secrets: $dotnet user-secrets set ConnectionStrings:FasTnT.Database "{your test connectionstring}" -p test\FasTnT.IntegrationTests\FasTnT.IntegrationTests.csproj;

If you don't setup this connection string, running the integration tests will end up with inconclusive result (not failed), and only unit tests will run.

Then you can run the tests using the command: $dotnet test FasTnT.sln

Clone this wiki locally