Тестирование проводится следующим образом (с использованием действий GitHub):
- Упакуйте тестовое приложение и загрузите его в s3.
- Упакуйте протестированные исполняемые файлы и загрузите в s3.
- Получите виртуальную машину.
- Загрузите 1 и 2
- Запустите команду dotnet test .... с соответствующими подробностями
Код: Выделить всё
❌ SomeTestName:
failure: Shouldly.ShouldAssertException : Shouldly uses your source code to generate its great error messages, build your test project with full debug information to get better error messages
The provided expression
should contain (case insensitive comparison)
"I want it to fail"
but was actually
"this is temp failure"
Код: Выделить всё
echo "::group::Publish Agent Lab Tests (Linux)"
dotnet publish -p:PlaywrightPlatform=linux-x64
cd ./bin/Debug/net7.0/
mkdir -p ${{ github.workspace }}/outputs
zip -r ${{ github.workspace }}/outputs/${{ inputs.agent_version }}-${{inputs.test_name}}-linux.zip publish
cd - > /dev/null
echo "::endgroup::"
Код: Выделить всё
public static class TestSetup
{
[ModuleInitializer]
public static void Initialize()
{
// Configure Shouldly to reduce verbose output
ShouldlyConfiguration.DisableSourceInErrors();
ShouldlyConfiguration.DefaultFloatingPointTolerance = 0.0001;
// Add string type to be compared as objects instead of character-by-character
ShouldlyConfiguration.CompareAsObjectTypes.Add(typeof(string).FullName);
}
}