Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9b3f4dc
Add setter to AccUnit_Factory template for external factory
josef-poetzl Nov 15, 2026
21ced99
Fix typo in comparer constraint failure messages
josef-poetzl Nov 15, 2026
16140f3
Ignore local Claude Code folder
josef-poetzl Nov 15, 2026
5ad481e
Add MCP server skeleton with Access session tools
josef-poetzl Nov 15, 2026
dd4be85
Skip database startup code when opening via MCP server
josef-poetzl Nov 15, 2026
a102140
Revert "Add setter to AccUnit_Factory template for external factory"
josef-poetzl Nov 15, 2026
80e6f96
Add test listing and test run tools to MCP server
josef-poetzl Nov 15, 2026
131d3cc
Check AccUnit loader before changing the database
josef-poetzl Nov 15, 2026
9c4910a
Merge branch 'dev' into feature/mcp-server
josef-poetzl Nov 15, 2026
c115af4
Return COM-visible test suite from VBE add-in bridge
josef-poetzl Nov 15, 2026
bea8038
Add missing factory members to VBE add-in bridge
josef-poetzl Nov 15, 2026
1dd459d
Merge branch 'fix/assert-compare-message' into dev
josef-poetzl Nov 15, 2026
6b7365b
Merge branch 'fix/vbe-addin-testsuite-com' into dev
josef-poetzl Nov 15, 2026
82fcf14
Merge branch 'dev' into feature/mcp-server
josef-poetzl Nov 15, 2026
ed94c00
Add test class draft and remove environment tools to MCP server
josef-poetzl Nov 16, 2026
7d29e92
Use host neutral names for MCP session tools
josef-poetzl Nov 16, 2026
ba79163
Add MCP server to build, release and documentation
josef-poetzl Nov 16, 2026
5015a91
Build VBE add-in tests with the CI configuration
josef-poetzl Nov 16, 2026
08b0a2c
Merge branch 'fix/ci-vbe-addin-tests' into dev
josef-poetzl Nov 16, 2026
3fc6fc0
Merge branch 'dev' into feature/mcp-server
josef-poetzl Nov 16, 2026
6e1e470
Merge pull request #91 from AccessCodeLib/feature/mcp-server
josef-poetzl Nov 16, 2026
32483f8
Add accunit-tests skill, install tool and short server instructions
josef-poetzl Nov 16, 2026
29cfb56
Describe array and number rules for row values in accunit-tests skill
josef-poetzl Nov 16, 2026
4f86ed5
Tighten test authoring rules in accunit-tests skill and server
josef-poetzl Nov 17, 2026
2765778
Add accunit_import_test_classes tool to MCP server
josef-poetzl Nov 17, 2026
734c6cb
Guard MCP server against foreign or unopened Access instances
josef-poetzl Nov 17, 2026
125a0bc
Add tools to export and remove single test classes
josef-poetzl Nov 17, 2026
9cfdb43
Merge pull request #92 from AccessCodeLib/fix/mcp-own-access-instance
josef-poetzl Nov 17, 2026
d55ac03
Merge pull request #93 from AccessCodeLib/feature/mcp-export-remove-t…
josef-poetzl Nov 17, 2026
81e0f23
Export test classes as UTF-8 with BOM and detect encoding on import
josef-poetzl Nov 17, 2026
f26b744
Merge pull request #94 from AccessCodeLib/feature/core-utf8-test-clas…
josef-poetzl Nov 17, 2026
5c7c9f4
Use core VbaSourceFile in MCP server import
josef-poetzl Nov 17, 2026
0a2cfbd
Merge pull request #95 from AccessCodeLib/feature/mcp-use-core-vba-so…
josef-poetzl Nov 17, 2026
bbbcf9c
Add ImportExportEncoding to Access add-in settings form
josef-poetzl Nov 17, 2026
28f3811
Merge pull request #96 from AccessCodeLib/feature/access-add-in-impor…
josef-poetzl Nov 17, 2026
26e8dcf
Expose CodeCoverageTracker on IAccessTestSuite and pass it through th…
josef-poetzl Nov 17, 2026
5f9f21c
Merge pull request #97 from AccessCodeLib/feature/codecoverage-tracke…
josef-poetzl Nov 17, 2026
2b2fcdc
Unadvise command bar COM events on dispose to prevent crash on Access…
josef-poetzl Nov 17, 2026
52adaba
Merge pull request #98 from AccessCodeLib/feature/vbe-addin-orphan-ac…
josef-poetzl Nov 17, 2026
8102c52
Remove COM access from finalizers and release COM objects in host lookup
josef-poetzl Nov 17, 2026
59fb89c
Merge pull request #99 from AccessCodeLib/feature/vbe-addin-com-cleanup
josef-poetzl Nov 17, 2026
882ac0c
Fix COM ownership and host lookup issues found in #99
josef-poetzl Nov 17, 2026
d9ecc9c
Merge pull request #100 from AccessCodeLib/feature/vbe-addin-com-foll…
josef-poetzl Nov 17, 2026
46658f1
Fix Clear() in CodeCoverageTracker for null/empty module name
josef-poetzl Nov 18, 2026
abfb07e
Throw instead of returning null when test suite init fails
josef-poetzl Nov 18, 2026
e911c6c
Merge pull request #101 from AccessCodeLib/feature/suite-error-handling
josef-poetzl Nov 18, 2026
8452e4e
Release 0.11.0: bump versions
josef-poetzl Nov 18, 2026
f5ea89e
Merge pull request #102 from AccessCodeLib/feature/release-0.11.0
josef-poetzl Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Builds the AccUnit library and the VBE add-in, runs the unit tests and creates the
# library zip AccUnit.<major.minor.patch>.bin.zip as workflow artifact.
# Builds the AccUnit library, the VBE add-in and the MCP server, runs the unit tests and creates the
# library zip AccUnit.<major.minor.patch>.bin.zip and the MCP server zip
# AccUnit.McpServer.<major.minor.patch>.zip as workflow artifacts.
# Runs for pushes and pull requests to dev/main and is called by the release workflow.

name: Build
Expand Down Expand Up @@ -61,6 +62,14 @@ jobs:
if ($LASTEXITCODE -ne 0) { throw "Build failed for $solution" }
}

# Own configuration (Release): the MCP server solution has no AzureCI configuration.
# /restore restores its PackageReference projects; the AccUnit projects were restored above.
- name: "Build MCP server"
shell: pwsh
run: |
msbuild mcp-server\AccessCodeLib.AccUnit.McpServer.sln /restore /p:Configuration=Release "/p:Platform=$env:BUILD_PLATFORM" /m /v:minimal /nologo
if ($LASTEXITCODE -ne 0) { throw "Build failed for the MCP server" }

- name: "Run unit tests"
shell: pwsh
run: |
Expand All @@ -71,6 +80,9 @@ jobs:
$excludedTestAssemblies = @('AccessTestClientTests.dll', 'AccessCodeLib.Common.VBIDETools.Tests.dll')
$testAssemblies = @(Get-ChildItem -Recurse -Filter '*Tests.dll' -Path source, vbe-add-In |
Where-Object { $_.FullName -match "\\bin\\$env:BUILD_CONFIGURATION\\" -and $_.Name -notin $excludedTestAssemblies })
# MCP server tests need no Access (built with Release, see "Build MCP server")
$testAssemblies += @(Get-ChildItem -Recurse -Filter '*Tests.dll' -Path mcp-server |
Where-Object { $_.FullName -match '\\bin\\Release\\' })
if ($testAssemblies.Count -eq 0) { throw "No test assemblies found" }
$testAssemblies.FullName
& $vstest $testAssemblies.FullName '/TestCaseFilter:TestCategory!=AccessClientTests' '/logger:trx' '/ResultsDirectory:TestResults'
Expand Down Expand Up @@ -114,3 +126,26 @@ jobs:
name: "AccUnit-bin"
path: build/AccUnit.*.bin.zip
if-no-files-found: error

# Same version as the AccUnit library: the MCP server is released together with AccUnit.
- name: "Create MCP server zip"
shell: pwsh
env:
VERSION: ${{ steps.zip.outputs.version }}
run: |
$serverDir = "mcp-server\AccUnit.McpServer\bin\Release\net48"
if (-not (Test-Path "$serverDir\AccUnit.McpServer.exe")) { throw "AccUnit.McpServer.exe not found in $serverDir" }
if (-not (Test-Path "$serverDir\skills\accunit-tests\SKILL.md")) { throw "Skill accunit-tests not found in $serverDir\skills" }
$files = @(Get-ChildItem -Path $serverDir -File | Where-Object { $_.Extension -ne '.pdb' })
$files | Format-Table Name, Length, LastWriteTime
$zipFile = "build\AccUnit.McpServer.$env:VERSION.zip"
# The folder skills (skill accunit-tests) is installed with the tool accunit_install_skill
Compress-Archive -Path (@($files.FullName) + "$serverDir\skills") -DestinationPath $zipFile -Force

# The artifact name is used by release.yml
- name: "Upload MCP server zip"
uses: actions/upload-artifact@v7
with:
name: "AccUnit-McpServer"
path: build/AccUnit.McpServer.*.zip
if-no-files-found: error
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Creates the release assets when a release is published:
# 1. build: builds the AccUnit library from the release tag (build.yml) -> artifact AccUnit-bin
# 2. upload-library: attaches AccUnit.<version>.bin.zip to the release
# 1. build: builds the AccUnit library and the MCP server from the release tag (build.yml)
# -> artifacts AccUnit-bin and AccUnit-McpServer
# 2. upload-library: attaches AccUnit.<version>.bin.zip and AccUnit.McpServer.<version>.zip to the release
# 3. build-access-add-in: builds the Access add-in (AccUnitLoader.accda) from access-add-in/source,
# loads the library files into the table usys_AppFiles and attaches
# AccUnitLoader.<add-in version>.Access.zip to the release
Expand Down Expand Up @@ -49,8 +50,14 @@ jobs:
name: "AccUnit-bin"
path: build

- name: "Upload library zip to release"
run: gh release upload "$RELEASE_TAG" build/AccUnit.*.bin.zip --repo "$GITHUB_REPOSITORY" --clobber
- name: "Download MCP server zip"
uses: actions/download-artifact@v8
with:
name: "AccUnit-McpServer"
path: build

- name: "Upload library and MCP server zip to release"
run: gh release upload "$RELEASE_TAG" build/AccUnit.*.bin.zip build/AccUnit.McpServer.*.zip --repo "$GITHUB_REPOSITORY" --clobber

build-access-add-in:
needs: build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
AGENTS.md
CLAUDE.md
logs/
.claude/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ For more informations see [Wiki](https://github.com/AccessCodeLib/AccUnit/wiki)
* Select tests to run
* show test result in tree view
* generate test procedures
* MCP server for AI agents (e.g. Claude Code)
* List and run tests, create drafts of test classes, remove the test environment
* See [mcp-server](https://github.com/AccessCodeLib/AccUnit/tree/main/mcp-server)

### Remarks
Examples see [./examples/msaccess/](https://github.com/AccessCodeLib/AccUnit/blob/main/examples/msaccess/)
Expand Down
2 changes: 2 additions & 0 deletions access-add-in/source/forms/AccUnitUserSettings.cls
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ End Sub
Private Sub LoadDataFromSettings()
With m_UserSettings
Me.txtImportExportFolder.Value = .ImportExportFolder
Me.cboImportExportEncoding.Value = .ImportExportEncoding
Me.txtTemplateFolder.Value = .TemplateFolder
Me.txtTestClassNameFormat.Value = .TestClassNameFormat
Me.txtTestMethodTemplate.Value = Replace(.TestMethodTemplate, vbTab, TabSpaces)
Expand All @@ -62,6 +63,7 @@ End Sub
Private Sub SaveDataToSettings()
With m_UserSettings
.ImportExportFolder = Me.txtImportExportFolder.Value
.ImportExportEncoding = Me.cboImportExportEncoding.Value
.TemplateFolder = Me.txtTemplateFolder.Value
.TestClassNameFormat = Me.txtTestClassNameFormat.Value
.TestMethodTemplate = Replace(Me.txtTestMethodTemplate.Value, TabSpaces, vbTab)
Expand Down
94 changes: 76 additions & 18 deletions access-add-in/source/forms/AccUnitUserSettings.form
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Begin Form
GridY =10
Width =11520
DatasheetFontHeight =11
ItemSuffix =209
ItemSuffix =211
Left =1000
Top =1000
Right =50000
Expand Down Expand Up @@ -85,6 +85,14 @@ Begin Form
BorderColor =12632256
FontName ="Calibri"
End
Begin ComboBox
BorderLineStyle =0
Width =1701
LabelX =-1701
FontSize =11
BorderColor =12632256
FontName ="Calibri"
End
Begin ToggleButton
Width =283
Height =283
Expand All @@ -99,7 +107,7 @@ Begin Form
GridlineShade =65.0
End
Begin Section
Height =5460
Height =6060
Name ="Detail"
Begin
Begin TextBox
Expand Down Expand Up @@ -196,20 +204,25 @@ Begin Form
End
End
End
Begin TextBox
Begin ComboBox
LimitToList = NotDefault
RowSourceTypeInt =1
OverlapFlags =85
TextAlign =1
IMESentenceMode =3
ColumnCount =2
Left =2340
Top =1320
Width =9060
Height =420
TabIndex =3
Name ="txtTemplateFolder"
Name ="cboImportExportEncoding"
RowSourceType ="Value List"
RowSource ="0;\"UTF-8 with BOM\";1;\"ANSI\""
ColumnWidths ="0;9060"
GroupTable =2
BottomPadding =150
HorizontalAnchor =2
ShowDatePicker =0

RowStart =2
RowEnd =2
Expand All @@ -227,8 +240,8 @@ Begin Form
Top =1320
Width =2160
Height =420
Name ="Label132"
Caption ="TemplateFolder:"
Name ="lblImportExportEncoding"
Caption ="ImportExportEncoding:"
GroupTable =2
RightPadding =0
BottomPadding =150
Expand All @@ -244,14 +257,59 @@ Begin Form
Begin TextBox
OverlapFlags =85
TextAlign =1
TextFontFamily =49
IMESentenceMode =3
Left =2340
Top =1920
Width =9060
Height =420
TabIndex =4
Name ="txtTemplateFolder"
GroupTable =2
BottomPadding =150
HorizontalAnchor =2
ShowDatePicker =0

RowStart =3
RowEnd =3
ColumnStart =1
ColumnEnd =1
LayoutGroup =1
GridlineThemeColorIndex =1
GridlineShade =65.0
GroupTable =2
Begin
Begin Label
OverlapFlags =85
TextAlign =1
Left =120
Top =1920
Width =2160
Height =420
Name ="Label132"
Caption ="TemplateFolder:"
GroupTable =2
RightPadding =0
BottomPadding =150
RowStart =3
RowEnd =3
LayoutGroup =1
GridlineThemeColorIndex =1
GridlineShade =65.0
GroupTable =2
End
End
End
Begin TextBox
OverlapFlags =85
TextAlign =1
TextFontFamily =49
IMESentenceMode =3
Left =2340
Top =2520
Width =9060
Height =2820
FontSize =10
TabIndex =5
TabIndex =6
Name ="txtTestMethodTemplate"
FontName ="Consolas"
GroupTable =2
Expand All @@ -260,8 +318,8 @@ Begin Form
VerticalAnchor =2
ShowDatePicker =0

RowStart =3
RowEnd =3
RowStart =4
RowEnd =4
ColumnStart =1
ColumnEnd =1
LayoutGroup =1
Expand All @@ -273,7 +331,7 @@ Begin Form
OverlapFlags =85
TextAlign =1
Left =120
Top =1920
Top =2520
Width =2160
Height =2820
Name ="Label134"
Expand All @@ -282,8 +340,8 @@ Begin Form
RightPadding =0
BottomPadding =0
VerticalAnchor =2
RowStart =3
RowEnd =3
RowStart =4
RowEnd =4
LayoutGroup =1
GridlineThemeColorIndex =1
GridlineShade =65.0
Expand All @@ -294,9 +352,9 @@ Begin Form
Begin CommandButton
OverlapFlags =85
Left =9689
Top =4860
Top =5460
Height =454
TabIndex =6
TabIndex =7
Name ="cmdCommit"
Caption ="Save"
OnClick ="[Event Procedure]"
Expand All @@ -307,9 +365,9 @@ Begin Form
Cancel = NotDefault
OverlapFlags =85
Left =113
Top =4860
Top =5460
Height =454
TabIndex =4
TabIndex =5
Name ="cmdCancel"
Caption ="Cancel"
OnClick ="[Event Procedure]"
Expand Down
9 changes: 9 additions & 0 deletions access-add-in/source/modules/TestSuite.cls
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ End Property

Public Property Set CodeCoverageTracker(ByVal NewRef As Object)
Set m_CodeCoverageTracker = NewRef
Set m_TestSuite.CodeCoverageTracker = NewRef
End Property

Private Property Set AccessTestSuite_CodeCoverageTracker(ByVal RHS As AccUnit.ICodeCoverageTracker)
Set CodeCoverageTracker = RHS
End Property

Private Property Get AccessTestSuite_CodeCoverageTracker() As AccUnit.ICodeCoverageTracker
Set AccessTestSuite_CodeCoverageTracker = m_TestSuite.CodeCoverageTracker
End Property

Private Sub m_TestSuite_TestSuiteStarted(ByVal TestSuite As AccUnit.ITestSuite)
Expand Down
2 changes: 1 addition & 1 deletion access-add-in/source/modules/_config_Application.bas
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Option Compare Text
Option Explicit

'Version number
Private Const APPLICATION_VERSION As String = "0.10.0000.261114"
Private Const APPLICATION_VERSION As String = "0.11.0000.261118"

Private Const APPLICATION_NAME As String = "ACLib AccUnit Loader"
Private Const APPLICATION_FULLNAME As String = "Access Code Library - AccUnit Loader"
Expand Down
Loading