tkpatro123 / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Gallio.Echo crashes while generating the final test report #822

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run a large number of tests in Echo
2.
3.

What is the expected output? What do you see instead?
Generating reports.
Disposing the test runner.
Stop time: 11:39 AM (Total execution time: 4296.818 seconds)
Error: A fatal exception occurred.
NVelocity.Exception.MethodInvocationException: Invocation of method 'PathToUri'
in  Gallio.Reports.Vtl.FormatHtmlHelper threw exception System.NullReferenceExce
ption : Object reference not set to an instance of an object. ---> System.NullRe
ferenceException: Object reference not set to an instance of an object.
   at Gallio.Reports.Vtl.FormatHtmlHelper.PathToUri(String path)
   --- End of inner exception stack trace ---
   at NVelocity.Runtime.Parser.Node.ASTMethod.Execute(Object o, IInternalContext
Adapter context)
   at NVelocity.Runtime.Parser.Node.ASTReference.Execute(Object o, IInternalCont
extAdapter context)
   at NVelocity.Runtime.Parser.Node.ASTSetDirective.Render(IInternalContextAdapt
er context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter cont
ext, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapte
r context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Directive.Parse.RenderTemplate(Template template, String
 arg, TextWriter writer, IInternalContextAdapter context)
   at NVelocity.Runtime.Directive.Parse.Render(IInternalContextAdapter context,
TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter cont
ext, TextWriter writer)
   at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context
, TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter cont
ext, TextWriter writer)
   at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context
, TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter cont
ext, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapte
r context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Directive.Parse.RenderTemplate(Template template, String
 arg, TextWriter writer, IInternalContextAdapter context)
   at NVelocity.Runtime.Directive.Parse.Render(IInternalContextAdapter context,
TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Directive.Foreach.ProcessSection(ForeachSectionEnum sect
ionEnumType, INode[][] sections, IInternalContextAdapter context, TextWriter wri
ter)
   at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context
, TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Directive.Parse.RenderTemplate(Template template, String
 arg, TextWriter writer, IInternalContextAdapter context)
   at NVelocity.Runtime.Directive.Parse.Render(IInternalContextAdapter context,
TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Directive.Foreach.ProcessSection(ForeachSectionEnum sect
ionEnumType, INode[][] sections, IInternalContextAdapter context, TextWriter wri
ter)
   at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context
, TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Directive.Parse.RenderTemplate(Template template, String
 arg, TextWriter writer, IInternalContextAdapter context)
   at NVelocity.Runtime.Directive.Parse.Render(IInternalContextAdapter context,
TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Directive.Foreach.ProcessSection(ForeachSectionEnum sect
ionEnumType, INode[][] sections, IInternalContextAdapter context, TextWriter wri
ter)
   at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context
, TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Directive.Parse.RenderTemplate(Template template, String
 arg, TextWriter writer, IInternalContextAdapter context)
   at NVelocity.Runtime.Directive.Parse.Render(IInternalContextAdapter context,
TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Directive.Foreach.ProcessSection(ForeachSectionEnum sect
ionEnumType, INode[][] sections, IInternalContextAdapter context, TextWriter wri
ter)
   at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context
, TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Directive.Parse.RenderTemplate(Template template, String
 arg, TextWriter writer, IInternalContextAdapter context)
   at NVelocity.Runtime.Directive.Parse.Render(IInternalContextAdapter context,
TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter cont
ext, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapte
r context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter cont
ext, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapte
r context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Runtime.Directive.Parse.RenderTemplate(Template template, String
 arg, TextWriter writer, IInternalContextAdapter context)
   at NVelocity.Runtime.Directive.Parse.Render(IInternalContextAdapter context,
TextWriter writer, INode node)
   at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter
context, TextWriter writer)
   at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter co
ntext, TextWriter writer)
   at NVelocity.Template.Merge(IContext context, TextWriter writer)
   at Gallio.Reports.Vtl.SingleFileVtlReportWriter.Run()
   at Gallio.Reports.VtlReportFormatter.Format(IReportWriter reportWriter, Repor
tFormatterOptions options, IProgressMonitor progressMonitor)
   at Gallio.Runner.TestLauncherResult.GenerateReports(String reportDirectory, S
tring reportName, ReportArchive reportArchive, IList`1 reportFormats, ReportForm
atterOptions reportFormatOptions, IReportManager reportManager, IProgressMonitor
 progressMonitor) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runne
r\TestLauncherResult.cs:line 171
   at Gallio.Runner.TestLauncher.<>c__DisplayClass8.<GenerateReports>b__7(IProgr
essMonitor progressMonitor) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Ga
llio\Runner\TestLauncher.cs:line 612
   at Gallio.Runner.TestLauncher.<>c__DisplayClass18.<RunWithProgress>b__16(IPro
gressMonitor progressMonitor) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\
Gallio\Runner\TestLauncher.cs:line 867
   at Gallio.Runtime.ProgressMonitoring.BaseProgressMonitorProvider.<>c__Display
Class1.<Run>b__0(IProgressMonitor ProgressMonitor) in c:\Server\Projects\MbUnit
v3.3\Work\src\Gallio\Gallio\Runtime\ProgressMonitoring\BaseProgressMonitorProvid
er.cs:line 31
   at Gallio.Runtime.ProgressMonitoring.BaseProgressMonitorProvider.Run[T](TaskW
ithProgress`1 task) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Run
time\ProgressMonitoring\BaseProgressMonitorProvider.cs:line 44
   at Gallio.Runner.TestLauncher.RunWithProgress(TaskWithProgress task, Boolean&
 canceled) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runner\TestL
auncher.cs:line 850
   at Gallio.Runner.TestLauncher.RunWithInitializedRunner(ITestRunner runner, Te
stProject consolidatedTestProject, IReportManager reportManager) in c:\Server\Pr
ojects\MbUnit v3.3\Work\src\Gallio\Gallio\Runner\TestLauncher.cs:line 578
   at Gallio.Runner.TestLauncher.RunWithRuntime() in c:\Server\Projects\MbUnit v
3.3\Work\src\Gallio\Gallio\Runner\TestLauncher.cs:line 550
   at Gallio.Runner.TestLauncher.Run() in c:\Server\Projects\MbUnit v3.3\Work\sr
c\Gallio\Gallio\Runner\TestLauncher.cs:line 480
   at Gallio.Echo.EchoProgram.RunTests(ILogger logger)
   at Gallio.Echo.EchoProgram.RunImpl(String[] args)
   at Gallio.Runtime.ConsoleSupport.ConsoleProgram`1.Run(IRichConsole console, S
tring[] args) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\C
onsoleSupport\ConsoleProgram.cs:line 198

Version 3.3.262 on Win7x64

Please use labels and text to provide additional information.

Original issue reported on code.google.com by wayne.br...@gmail.com on 27 Feb 2011 at 4:54

GoogleCodeExporter commented 8 years ago
Ah! I looks like you found a bug in VTL engine. FormatHtmlHelper.PathToUri 
needs to handle with null paths correctly (returning an empty string should be 
enough)

Original comment by Yann.Tre...@gmail.com on 27 Feb 2011 at 7:54

GoogleCodeExporter commented 8 years ago
And meanwhile, you might want to use the former XSL engine formatter 
("Html-Old")

Original comment by Yann.Tre...@gmail.com on 27 Feb 2011 at 7:56

GoogleCodeExporter commented 8 years ago
Thanks - I did switch back to the old format. Is this an easy fix? A simple 
guard against a null arg?

Original comment by wayne.br...@gmail.com on 28 Feb 2011 at 2:17

GoogleCodeExporter commented 8 years ago

Original comment by Yann.Tre...@gmail.com on 28 Feb 2011 at 9:11

GoogleCodeExporter commented 8 years ago
I think so. While migrating from XSL to VTL, I was unsure how the .NET XSLT 
engine was handling with default values (such as null strings). I was actually 
even not sure if those special cases were supposed to happen. So I just let 
them unhandled and let the system fail fast in case it occurs.

Original comment by Yann.Tre...@gmail.com on 28 Feb 2011 at 9:13