Log filename with integration tests
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
1973ff50fa
commit
d131f2343f
@ -22,7 +22,9 @@ public class IntegrationTestRunner
|
|||||||
yield return () =>
|
yield return () =>
|
||||||
{
|
{
|
||||||
var json = File.ReadAllText(file);
|
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)
|
public async Task RunIntegrationTest(IntegrationTestModel test)
|
||||||
{
|
{
|
||||||
var library = LibraryHelpers.LoadLibrary();
|
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) =>
|
var parties = await test.BattleSetup.Parties.SelectAsync(async Task<IBattleParty> (x) =>
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,7 @@ namespace PkmnLib.Tests.Integration.Models;
|
|||||||
|
|
||||||
public class IntegrationTestModel
|
public class IntegrationTestModel
|
||||||
{
|
{
|
||||||
|
public string FileName { get; set; } = null!;
|
||||||
public string Name { get; set; } = null!;
|
public string Name { get; set; } = null!;
|
||||||
public string Description { get; set; } = null!;
|
public string Description { get; set; } = null!;
|
||||||
public IntegrationTestBattleSetup BattleSetup { get; set; } = null!;
|
public IntegrationTestBattleSetup BattleSetup { get; set; } = null!;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user