This repository contains a C#/NuGet library that abstracts out API functionality for Relativity test setup and teardown.
This repository builds with the dotnet sdk. It supports standard tasks like dotnet build, dotnet test and dotnet pack.
This repository has unit and functional tests in it. Functional tests have Category=FunctionalTests.
Run through the standard compile and (unit) test tasks. These can be done without any external environment to test on.
dotnet test ./Source/ --filter TestCategory!=FunctionalTests
To do the rest of the testing, we need to provide an instance of Relativity to test against. This should ideally be an ephemeral one that we can throw away afterwards.
Before we can run the tests, we'll need to provide a runsettings file that points the tests to the instance of Relativity that is being tested against. To create the runsettings file, run the following command, replacing instance settings parameters with what you need:
./DevelopmentScripts/New-TestSettings.ps1 -ServerBindingType "https" -RelativityHostAddress "YOUR_HOST_ADDRESS" -AdminUsername "YOUR_ADMIN_USERNAME" -AdminPassword "YOUR_ADMIN_PASSWORD"
This script will create FunctionalTest.runsettings and put it next to itself. You shall use this file to setup functional testing.
Run Tests in Visual Studio:
- Attach your runsettings file to the solution in Visual Studio.
- Use the built in test runner.
You can also run functional tests from the command line:
dotnet test ./Source/ --filter TestCategory=FunctionalTests -s .\DevelopmentScripts\FunctionalTest.runsettings
For more details check out our documentation that can be found here