rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 302 forks source link

Test Method option not available in unit testing #6222

Closed PioPio2 closed 2 months ago

PioPio2 commented 3 months ago

Rubberduck version information The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:

Rubberduck version 2.5.9.6316
Operating System: Win 7 32bit

Description I can successfully create the test module but once done I cannot create any test method because the option is grayed out. if I add one manually then I don't have it in the test list in the test explorer. This happens only to big projects but not in small ones.

Expected behavior The option test method should be available

Screenshots Immagine

Logfile 2024-08-18 15:34:12.2078;WARN-2.5.9.6316;Rubberduck.Parsing.VBA.ReferenceManagement.CompilationPasses.TypeHierarchyPass;Failed to resolve interface Form3.; 2024-08-18 15:34:12.2078;WARN-2.5.9.6316;Rubberduck.Parsing.VBA.ReferenceManagement.CompilationPasses.TypeHierarchyPass;Failed to resolve interface _Form_MskInsuranceCL.; 2024-08-18 15:34:12.2078;WARN-2.5.9.6316;Rubberduck.Parsing.VBA.ReferenceManagement.CompilationPasses.TypeHierarchyPass;Failed to resolve interface Form3.; 2024-08-18 15:34:12.2078;ERROR-2.5.9.6316;Rubberduck.Parsing.VBA.ReferenceManagement.ReferenceResolveRunnerBase;Exception thrown on resolving those modules: 'xxxxx.TestModule4,xxxxx.Utility3,xxxx.basOGL,(thread 43).;System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto. in Rubberduck.Parsing.Symbols.Identifier.GetIdentifierValueContext(IdentifierContext context) in Rubberduck.Parsing.Binding.SimpleNameTypeBinding.Resolve() in Rubberduck.Parsing.Binding.TypeBindingContext.Resolve(Declaration module, Declaration parent, ParserRuleContext expression, IBoundExpression withBlockVariable, StatementResolutionContext statementContext, Boolean requiresLetCoercion, Boolean isLetAssignment) in Rubberduck.Parsing.Binding.BindingService.ResolveType(Declaration module, Declaration parent, ParserRuleContext expression) in Rubberduck.Parsing.VBA.ReferenceManagement.CompilationPasses.TypeHierarchyPass.AddImplementedInterface(Declaration potentialClassModule) in Rubberduck.Parsing.VBA.ReferenceManagement.CompilationPasses.TypeHierarchyPass.Execute(IReadOnlyCollection1 modules) in Rubberduck.Parsing.VBA.ReferenceManagement.ReferenceResolveRunnerBase.<>c__DisplayClass12_0.<ExecuteCompilationPasses>b__0(ICompilationPass p) in System.Collections.Generic.List1.ForEach(Action1 action) in Rubberduck.Parsing.VBA.ReferenceManagement.ReferenceResolveRunnerBase.ExecuteCompilationPasses(IReadOnlyCollection1 modules, CancellationToken token)

PioPio2 commented 2 months ago

In the end I solved the issues by creating a new Access file and transfer over all forms, queries, modules etc. No more errors here now.