Skip to content

Commit

Permalink
test: stabilize GetPerformanceDataTest and add assert messages (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dor-bl authored May 19, 2024
1 parent 26950da commit afd78a8
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/integration/Android/Device/PerformanceDataTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,25 @@ public void GetPerformanceDataTest()

Assert.Multiple(() =>
{
Assert.That(androidDriver?.GetPerformanceData(packageName, PerformanceDataType.CpuInfo), Is.Not.Null.Or.Empty);
Assert.That(androidDriver?.GetPerformanceData(packageName, PerformanceDataType.CpuInfo, 15),
Is.Not.Null.Or.Empty);
Assert.That(androidDriver?.GetPerformanceData("logd", PerformanceDataType.CpuInfo),
Is.Not.Null.Or.Empty,
"CPU Info data should not be null or empty");

Assert.That(androidDriver?.GetPerformanceData("logd", PerformanceDataType.CpuInfo, 15),
Is.Not.Null.Or.Empty,
"CPU Info data should not be null or empty after 15 read attempts");

Assert.That(androidDriver?.GetPerformanceData(packageName, PerformanceDataType.MemoryInfo, 5),
Is.Not.Null.Or.Empty);
Is.Not.Null.Or.Empty,
"Memory Info data should not be null or empty");

Assert.That(androidDriver?.GetPerformanceData(packageName, PerformanceDataType.BatteryInfo, 5),
Is.Not.Null.Or.Empty);
Is.Not.Null.Or.Empty,
"Battery Info data should not be null or empty");

Assert.That(androidDriver?.GetPerformanceData(packageName, PerformanceDataType.NetworkInfo, 5),
Is.Not.Null.Or.Empty);
Is.Not.Null.Or.Empty,
"Network Info data should not be null or empty");
});
}
}
Expand Down

0 comments on commit afd78a8

Please sign in to comment.