Skip to content

Commit

Permalink
Merge branch 'main' into TaskTemplates
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfVio authored Dec 20, 2023
2 parents b4acea5 + 0b861cf commit f2bf588
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 7 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build_tool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build Report Tool

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

strategy:
matrix:
configuration: [Release]

runs-on: windows-2022 # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on

env:
Solution_Name: STI Test Report.sln

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Build
run: dotnet build --configuration Release

- name: Show Directory Content
run: dir "D:\a\STITestReport\STITestReport\STI Test Report\bin\release"

- name: Build Installer
working-directory: D:\a\STITestReport\STITestReport\Install
run: |
& "C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" STITestReport.wxs
& "C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe" STITestReport.wixobj
- name: Show Directory Content
run: dir "D:\a\STITestReport\STITestReport\Install"

- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: binaries
path: D:\a\STITestReport\STITestReport\STI Test Report\bin\release\net6.0-windows10.0.17763.0\

- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: installer
path: D:\a\STITestReport\STITestReport\Install\STITestReport.msi
3 changes: 0 additions & 3 deletions SQLiteConnector/DAL_SQLite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,8 @@ public void Rdr_Close()

throw new FormatException($"Unable to read date or time '{value}'");
}

#endregion

#endregion


}
}
14 changes: 14 additions & 0 deletions STI Test Report/ReadForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion STI Test Report/ReadForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public ReadForm()
this.testSuites_TextBox.Text = Program.UserSettings.GetTestSuiteIds();
if (Program.UserSettings.BatchSize > 0)
this.batchSize_TextBox.Text = Program.UserSettings.BatchSize.ToString();
this.repeats_ComboBox.SelectedIndex = 0;
}

private void RadioButton_CheckedChanged(object sender, EventArgs e)
Expand All @@ -32,7 +33,7 @@ private void RadioButton_CheckedChanged(object sender, EventArgs e)

this.testSuites_TextBox.Enabled = sender == readTestPoints_radioButton
|| sender == readTestResults_radioButton;
this.batchSize_TextBox.Enabled = this.deleteRecords_CheckBox.Enabled = sender == readTestResults_radioButton;
this.batchSize_TextBox.Enabled = this.deleteRecords_CheckBox.Enabled = this.repeats_ComboBox.Enabled = sender == readTestResults_radioButton;
}

private void read_button_Click(object sender, EventArgs e)
Expand All @@ -53,6 +54,7 @@ private void read_button_Click(object sender, EventArgs e)
{
CreateNewFile = createDB_checkBox.Checked,
TestSuiteIds = testSuiteIds,
Repeats=1,
};
Program.UserSettings.TestSuiteIds = _parameters.TestSuiteIds;

Expand All @@ -70,6 +72,7 @@ private void read_button_Click(object sender, EventArgs e)
{
_parameters.ProcessType = ReadReportData.Parameters.ProcessTypes.testResults;
_parameters.KeepRecords = !this.deleteRecords_CheckBox.Checked;
_parameters.Repeats = Math.Max(1, this.repeats_ComboBox.SelectedIndex + 1);
if (this.batchSize_TextBox.Text.Trim() != "")
{
if (!int.TryParse(this.batchSize_TextBox.Text.Trim(), out int batchSize))
Expand Down
1 change: 1 addition & 0 deletions STI Test Report/ReadReportData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public enum ProcessTypes { testPoints, testRuns, testResults, workItems }
public bool CreateNewFile { get; set; }
public int? BatchSize { get; set; }
public bool KeepRecords { get; set; }
public int Repeats { get; set; }
public List<int> TestSuiteIds { get; set; }

public string LogHeader()
Expand Down
4 changes: 2 additions & 2 deletions STI Test Report/STI Test Report.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<Company>Philips</Company>
<ProductName>STI Test Report</ProductName>
<StartupObject>STI_Test_Report.Program</StartupObject>
<Version>1.0.1.4</Version>
<FileVersion>1.0.1.4</FileVersion>
<Version>1.0.1.4</Version>
<FileVersion>1.0.1.4</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion STI Test Report/StartForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ private async void Read_button_Click(object sender, EventArgs e)
return;
parameters.TestPlanId = testPlanWorkItem.Id;

await ReadReportData(parameters);
for (int i = 0; i < Math.Max(1, parameters.Repeats); i++)
await ReadReportData(parameters);
}
#endregion

Expand Down

0 comments on commit f2bf588

Please sign in to comment.