Skip to content

Commit a107b93

Browse files
Merge pull request #54 from AutomateThePlanet/experimental-desktop-driver
Updated Desktop Module with NovaWindows appium driver and LLM config fixes
2 parents 94ad56f + 81e40c1 commit a107b93

File tree

486 files changed

+2634
-2063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

486 files changed

+2634
-2063
lines changed

.claude/settings.local.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(dotnet build:*)",
5+
"Bash(powershell -Command \"Get-ChildItem -Path . -Recurse -Include *.cs | ForEach-Object { (Get-Content $_.FullName) -replace ''Assert\\.AreEqual\\(true,\\s*'', ''Assert.IsTrue('' | Set-Content $_.FullName }\")",
6+
"Bash(powershell:*)",
7+
"Bash(dotnet clean:*)"
8+
]
9+
}
10+
}

.github/workflows/github-actions-tests-on-windows.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Setup .NET 8 SDK
12+
- name: Setup .NET 10 SDK
1313
uses: actions/setup-dotnet@v1.7.2
1414
with:
15-
dotnet-version: 8.0.x
16-
- name: Setup .NET 9 SDK
17-
uses: actions/setup-dotnet@v1.7.2
18-
with:
19-
dotnet-version: 9.0.x
15+
dotnet-version: 10.0.x
2016
- name: Clean
2117
run: dotnet clean
2218
- name: Install dependencies

Bellatrix.LLM/Bellatrix.LLM.csproj

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
88

9-
<ItemGroup>
10-
<ProjectReference Include="..\src\Bellatrix.Core\Bellatrix.Core.csproj" />
11-
<ProjectReference Include="..\src\Bellatrix.KeyVault\Bellatrix.KeyVault.csproj" />
12-
<ProjectReference Include="..\src\Bellatrix.Plugins.Screenshots\Bellatrix.Plugins.Screenshots.csproj" />
13-
</ItemGroup>
9+
<ItemGroup>
10+
<ProjectReference Include="..\src\Bellatrix.Core\Bellatrix.Core.csproj" />
11+
<ProjectReference Include="..\src\Bellatrix.KeyVault\Bellatrix.KeyVault.csproj" />
12+
<ProjectReference Include="..\src\Bellatrix.Plugins.Screenshots\Bellatrix.Plugins.Screenshots.csproj" />
13+
</ItemGroup>
1414

15-
<ItemGroup>
16-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.5" />
17-
<PackageReference Include="Microsoft.SemanticKernel" Version="1.50.0" />
18-
<PackageReference Include="Microsoft.KernelMemory" Version="0.98.250508.3" />
19-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
20-
<PackageReference Include="NUnit" Version="4.3.2" />
21-
</ItemGroup>
15+
<ItemGroup>
16+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
17+
<PackageReference Include="Microsoft.SemanticKernel" Version="1.68.0" />
18+
<!-- DO NOT update Microsoft.KernelMemory unless we move to .NET 9 -->
19+
<PackageReference Include="Microsoft.KernelMemory" Version="0.98.250508.3" />
20+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
21+
<PackageReference Include="NUnit" Version="4.4.0" />
22+
</ItemGroup>
2223

23-
</Project>
24+
</Project>

Bellatrix.LLM/SemanticKernelService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ private static void EnsureInitialized()
5454
return;
5555

5656
var llmSettings = ConfigurationService.GetSection<LargeLanguageModelsSettings>();
57-
57+
if (llmSettings == null)
58+
return;
59+
5860
var genSettings = llmSettings.ModelSettings[0];
5961
var embedSettings = llmSettings.ModelSettings[1];
6062

Bellatrix.LLM/assertions/AiAssert.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void AssertByPrompt(string assertInstruction)
4141

4242
if (string.IsNullOrWhiteSpace(verdict) || !verdict.Contains("PASS", StringComparison.OrdinalIgnoreCase))
4343
{
44-
Assert.Fail($"AI Assert failed: {assertInstruction} - {verdict}");
44+
Assertions.Assert.Fail($"AI Assert failed: {assertInstruction} - {verdict}");
4545
}
4646

4747
Console.WriteLine("✅ AI Assert passed: " + assertInstruction);

Bellatrix.LLM/plugins/SmartFailureAnalysisPlugin .cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// The architecture and agent logic are original contributions by Anton Angelov, forming the foundation for a PhD dissertation.
1616
// Please cite or credit appropriately if reusing in academic or commercial work.</note>
1717

18+
using Bellatrix.LLM.Settings;
1819
using Bellatrix.Plugins.Screenshots.Contracts;
1920
using Bellatrix.Plugins;
2021
using Bellatrix.Plugins.Screenshots.Plugins;
@@ -26,12 +27,15 @@ public class SmartFailureAnalysisPlugin : Plugin, IScreenshotPlugin
2627
private readonly IScreenshotOutputProvider _screenshotOutputProvider;
2728
private readonly IViewSnapshotProvider _viewSnapshotProvider;
2829
private static ThreadLocal<string> _screenshotPath = new ThreadLocal<string>();
30+
private readonly bool _isEnabled;
2931

3032

3133
public SmartFailureAnalysisPlugin()
3234
{
3335
_screenshotOutputProvider = ServicesCollection.Current.Resolve<IScreenshotOutputProvider>();
3436
_viewSnapshotProvider = ServicesCollection.Main.Resolve<IViewSnapshotProvider>();
37+
var largeLanguageModelsSettings = ConfigurationService.GetSection<LargeLanguageModelsSettings>();
38+
_isEnabled = largeLanguageModelsSettings?.EnableSmartFailureAnalysis ?? false;
3539
}
3640

3741
public static void Add()
@@ -60,6 +64,7 @@ public void ScreenshotGenerated(object sender, ScreenshotPluginEventArgs args)
6064

6165
protected override void PreTestCleanup(object sender, PluginEventArgs e)
6266
{
67+
if (!_isEnabled) return;
6368
if (e.TestOutcome == TestOutcome.Passed)
6469
{
6570
var log = Logger.GetLogs();
@@ -87,7 +92,7 @@ private void RunFailureAnalysisAsync(PluginEventArgs e)
8792
snapshot,
8893
_screenshotPath.Value ?? string.Empty);
8994

90-
95+
9196
}
9297
catch (Exception ex)
9398
{
@@ -112,4 +117,4 @@ private void RunFailureAnalysisAsync(PluginEventArgs e)
112117
//{extended}
113118
//""");
114119
}
115-
}
120+
}

shared/SharedAssemblyInfo.targets

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
4-
<LangVersion>11.0</LangVersion>
3+
<TargetFramework>net10.0</TargetFramework>
4+
<LangVersion>14.0</LangVersion>
55
<Configurations>DEBUG;STAGE;QA;LOCAL</Configurations>
66
</PropertyGroup>
77
<PropertyGroup>
8-
<Version>3.9.0.0</Version>
8+
<Version>3.9.5.0</Version>
99
<Authors>Automate The Planet Ltd.</Authors>
1010
<Company>Automate The Planet Ltd.</Company>
1111
<Product>Bellatrix Test Framework</Product>
12-
<AssemblyVersion>3.9.0.0</AssemblyVersion>
13-
<FileVersion>3.9.0.0</FileVersion>
12+
<AssemblyVersion>3.9.5.0</AssemblyVersion>
13+
<FileVersion>3.9.5.0</FileVersion>
1414
<NeutralLanguage>en</NeutralLanguage>
1515
<Copyright>Automate The Planet Ltd. 2024</Copyright>
1616
<PackageReleaseNotes>
17-
- Added DevExtreme Components v1.2.0
18-
- Fixed parallel execution
19-
- Added Excel Service
20-
- Fixed formatting
21-
- Added qTestId plugin
22-
- Added Advanced CkEditor component
23-
- Added DevExtreme Components v.1.0
24-
- .NET 8 Support
25-
- Selenium Manager Support
26-
- Upgrade All NuGet Packages
27-
- Chrome Headless uses the new headless mode now
28-
- Fixed grid execution driver additional options to Selenium 4
29-
- Added SetModelColumns method to grid extensions
30-
- Upgraded Azure KeyVault Identity
31-
- Upgraded WebDriver Manager Version
17+
- added many new improvements to desktop module
18+
- added support for .NET 10
19+
- added support to Appium 3.x
20+
- improved test execution performance
21+
- fix some LLM related issues
3222
- upgrade all 3rd-party NuGet packages
3323
- fix all known bugs
3424
</PackageReleaseNotes>
@@ -45,7 +35,7 @@
4535
<RunAnalyzers>true</RunAnalyzers>
4636
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
4737
<WarningsAsErrors />
48-
<NoWarn>NU1701;NU1702;NU1705;NU1608;</NoWarn>
38+
<NoWarn>NU1701;NU1702;NU1705;NU1608;NU1903;NU1902;NU1904;MSTEST0001</NoWarn>
4939
</PropertyGroup>
5040
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
5141
<Optimize>true</Optimize>
@@ -55,6 +45,6 @@
5545
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
5646
<RunAnalyzers>false</RunAnalyzers>
5747
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
58-
<NoWarn>NU1701;NU1702;NU1705;NU1608;</NoWarn>
48+
<NoWarn>NU1701;NU1702;NU1705;NU1608;MSTEST0001</NoWarn>
5949
</PropertyGroup>
60-
</Project>
50+
</Project>

src/Bellatrix.AWS/Bellatrix.AWS.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<PackageReference Include="AWSSDK.S3" Version="4.0.17" />
77
<PackageReference Include="AWSSDK.SecretsManager" Version="4.0.4.3" />
88
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />
9-
<PackageReference Include="NUnit" Version="4.3.2" />
10-
</ItemGroup>
9+
<PackageReference Include="NUnit" Version="4.4.0" />
10+
</ItemGroup>
1111
<ItemGroup>
1212
<ProjectReference Include="..\Bellatrix.Core\Bellatrix.Core.csproj" />
13-
</ItemGroup>
13+
</ItemGroup>
1414
<ItemGroup>
15-
<PackageReference Include="mailslurp" Version="15.19.22" />
16-
<PackageReference Include="RestSharp" Version="112.1.1-alpha.0.4" />
15+
<PackageReference Include="mailslurp" Version="17.0.0" />
16+
<PackageReference Include="RestSharp" Version="113.0.0" />
1717
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
1818
<PrivateAssets>all</PrivateAssets>
1919
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/Bellatrix.Allure/Bellatrix.Results.Allure.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<ItemGroup>
55
<PackageReference Include="Allure.Commons" Version="3.5.0.73" />
6-
<PackageReference Include="NUnit" Version="4.3.2" />
6+
<PackageReference Include="NUnit" Version="4.4.0" />
77
</ItemGroup>
88

99
<ItemGroup>

src/Bellatrix.Api/Bellatrix.API.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\shared\SharedAssemblyInfo.targets" />
33
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
4-
<NoWarn>NU1701;NU1702;NU1705;NU1608;NU1902;</NoWarn>
4+
<NoWarn>NU1701;NU1702;NU1705;NU1608;NU1902;MSTEST0001</NoWarn>
55
</PropertyGroup>
66

77
<ItemGroup>
88

99
<PackageReference Include="Newtonsoft.Json.Schema" Version="4.0.1" />
1010

11-
<PackageReference Include="NUnit" Version="4.3.2" />
12-
<PackageReference Include="Polly" Version="8.5.2" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.5" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
15-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.5" />
16-
<PackageReference Include="RestSharp" Version="112.1.1-alpha.0.4" />
17-
<PackageReference Include="MSTest" Version="3.8.3" />
11+
<PackageReference Include="NUnit" Version="4.4.0" />
12+
<PackageReference Include="Polly" Version="8.6.5" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.1" />
14+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.1" />
15+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.1" />
16+
<PackageReference Include="RestSharp" Version="113.0.0" />
17+
<PackageReference Include="MSTest" Version="4.0.2" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)