Skip to content

Commit

Permalink
Update Github Actions Test reporter (#102)
Browse files Browse the repository at this point in the history
* Update Github Actions Test reporter

* add log details on failures

* filter explicitly on service.name
  • Loading branch information
Mpdreamz authored Jun 3, 2024
1 parent fa8b9d4 commit c533c69
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ let private runTests suite _ =
let logger =
// use junit xml logging locally, github actions logs using console out formats
match BuildServer.isGitHubActionsBuild with
| true -> "--logger:\"GitHubActions;summary.includePassedTests=false\""
| true -> "--logger:\"GitHubActions;summary.includePassedTests=false;summary.includeNotFoundTests=false\""
| false ->
let testOutputPath = Paths.ArtifactPath "tests"
let junitOutput = Path.Combine(testOutputPath.FullName, "junit-{assembly}-{framework}-test-results.xml")
Expand Down
2 changes: 1 addition & 1 deletion tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ItemGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(ProjectName), '^(.*)Tests$'))">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />

<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" PrivateAssets="All" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="JunitXml.TestLogger" Version="3.1.12" PrivateAssets="All" />
<PackageReference Include="Nullean.VsTest.Pretty.TestLogger" Version="0.4.0" PrivateAssets="All" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public async Task WaitForServiceOnOverview(IPage page)
var queryBar = page.GetByRole(AriaRole.Textbox, new() { Name = "Start typing to search and filter the APM page" });
await queryBar.WaitForAsync(new() { State = WaitForSelectorState.Visible, Timeout = timeout });

await queryBar.FillAsync(_serviceName);
await queryBar.FillAsync($"service.name: {_serviceName}");
await queryBar.PressAsync("Enter");

Exception? observed = null;
Expand Down
2 changes: 1 addition & 1 deletion tests/Elastic.OpenTelemetry.EndToEndTests/ServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task DisposeAsync()
var success = PartitionContext.TestException == null;
await fixture.ApmUI.StopTrace(_page, success, _testName);

if (!success)
if (success)
return;

DotNetRunApplication.IterateOverLog(Output.WriteLine);
Expand Down

0 comments on commit c533c69

Please sign in to comment.