Skip to content

Performance: Writing HTML reports is incredibly slow #137

@craigfowler

Description

@craigfowler

I have recently tried writing a large HTML report from the Agiil project and this has crashed NUnit because it took too long to unload the test assembly (this time was surely spent rendering the HTML report).

Example of error

This is a snippet of the error received from NUnit. The test results are written correctly, but the HTML report is never completely generated. It crashes with ThreadAbortException whilst still rendering.

Test Run Summary
  Overall result: Passed
  Test Count: 49, Passed: 49, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0                                                                                                                                                
  Start time: 2018-03-12 20:05:11Z                                                                                                                                                                                               
    End time: 2018-03-12 20:10:32Z                                                                                                                                                                                               
    Duration: 321.007 seconds                                                                                                                                                                                                    

Results (nunit3) saved as TestResult.xml                                                                                                                                                                                         

Unable to unload AppDomain, Unload thread timed out.                                                                                                                                                                             
Agent Process was terminated successfully after error.                                                                                                                                                                           
Error whilst writing HTML report
CSF.Zpt.Rendering.ModelEvaluationException: An error was encountered evaluating an expression whilst processing a '[(tal):(http://xml.zope.org/namespaces/tal)]:define' attribute on element 'div', see the inner exception for more details.                                                                                                                                                                                                                     
Source expression:load:macro ---> CSF.Zpt.Rendering.ModelEvaluationException: An error was encountered evaluating an expression whilst processing a '[(tal):(http://xml.zope.org/namespaces/tal)]:define' attribute on element 'tal:block', see the inner exception for more details.                                                                                                                                                                             
Source expression:load:macro ---> System.Threading.ThreadAbortException

More info

Apparently that timeout is 30 seconds and so I need to ensure that I'm rendering the report far more quickly than that.

This is almost certainly an upstream ZPT-Sharp issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    defer/blockedCould be worked-on but not yet; lower priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions