Log filename with integration tests
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Deukhoofd 2025-05-03 17:57:36 +02:00
parent 1973ff50fa
commit d131f2343f
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 10 additions and 1 deletions

View File

@ -22,7 +22,9 @@ public class IntegrationTestRunner
yield return () =>
{
var json = File.ReadAllText(file);
return JsonSerializer.Deserialize<IntegrationTestModel>(json, serializerOptions)!;
var o = JsonSerializer.Deserialize<IntegrationTestModel>(json, serializerOptions)!;
o.FileName = Path.GetFullPath(file);
return o;
};
}
}
@ -31,6 +33,12 @@ public class IntegrationTestRunner
public async Task RunIntegrationTest(IntegrationTestModel test)
{
var library = LibraryHelpers.LoadLibrary();
await TestContext.Current!.OutputWriter.WriteLineAsync("File: " + $"file://{test.FileName}");
TestContext.Current.AddArtifact(new Artifact
{
File = new FileInfo(test.FileName),
DisplayName = test.Name,
});
var parties = await test.BattleSetup.Parties.SelectAsync(async Task<IBattleParty> (x) =>
{

View File

@ -2,6 +2,7 @@ namespace PkmnLib.Tests.Integration.Models;
public class IntegrationTestModel
{
public string FileName { get; set; } = null!;
public string Name { get; set; } = null!;
public string Description { get; set; } = null!;
public IntegrationTestBattleSetup BattleSetup { get; set; } = null!;