- 
                Notifications
    You must be signed in to change notification settings 
- Fork 391
Enable the independent unload of instrumented modules without generating final report #1688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            JosephSun2003
  wants to merge
  18
  commits into
  coverlet-coverage:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
JosephSun2003:development
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Open
            
            Enable the independent unload of instrumented modules without generating final report #1688
                    JosephSun2003
  wants to merge
  18
  commits into
  coverlet-coverage:master
from
JosephSun2003:development
  
      
      
   
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    …nit testing with existing tests
…asic code clean up
* Revert "Revert changes to CoverageWrapper.cs and ICoverageWrapper.cs" This reverts commit 25feb24. * Revert "Adjust arguement name to trigger the skip of coverage calculation" This reverts commit c54c5cf. * Revert "Add unit tests to new methods" This reverts commit c3905a1. * Revert "Revert refactorings caught by Geotab Analyzers" This reverts commit cbe14cc. * Revert "add unload modules unique specifically for use in coverlet.console" This reverts commit 98f1f75. * Revert "Remove possibly unneeded variables" This reverts commit 6d2dd57. * Revert "Unrollback change removals to integrate new changes with VSTest Integration" This reverts commit 9d4de10. * Revert "Refactor explicit and implicit variable usage to comply with dotnet code style rules" This reverts commit e67ba69. * Revert "Add minor documentation corrections and remove unneeded changes" This reverts commit da1257e. * Revert "Update documentation to clarify the modifications made and add some basic code clean up" This reverts commit 0dfef6f. * Revert "Fix problems encountered with newly added method and variables from unit testing with existing tests" This reverts commit dcc3c29. * Revert "Add new method to manually call the unloading of modules" This reverts commit 88a5782. --------- Co-authored-by: Joseph Sun <[email protected]>
| Note: some of these changes were done with my coporate account, apologies if this creates any confusion. | 
4dacccc    to
    d466ae1      
    Compare
  
    16e8543    to
    2a72fe5      
    Compare
  
    
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Dear Coverlet Team,
I’m an intern at Geotab tasked with fixing a hack used in my company's continious integration and development testing.
To briefly explain, Geotab is a telematics company focused on providing fleet management solutions for both private and public sector organisations. The company utilises Coverlet to assist with its continuous integration and development, primarily calculating and tracking unit test coverage as per Coverlet's design.
Associated issue with this PR: #1694
The Problem
The problem encountered with the incorporation of Coverlet is the needlessly redundant processing when jobs are parallelized. Specifically, the execution of the unloading of instrumentation and aggregation of Coverlet’s test coverage result.
Since instrumentation unloading and Coverlet’s result aggregation are set to always occur one after the other, parallelized jobs will run multiple instances of report generation simultaneously, these results would then be used to further report generation to aggregate the already aggregated results.
As such, the simultaneous report generation is an unnecessary process as one instance of report generation can be run instead, rather than the multiple in parallel that require the further aggregation anyways.
GeoTab’s Hack
The hack implemented by my supervisor, then, is to invoke the unloading of instrumentation using the .Net Reflection library. This hack is similar to the one used in Coverlet's VSTest Platform integration as noted here.
Problems with the Hack
The main problem with this hack is the long term maintenance of Geotab’s Coverlet integration. Unlike the VSTest integration, any changes to Coverlet involving the unloading of instrumentation may result in numerous undetectable issues for Geotab.
As such, Geotab, and many users who utilise parallelization, would benefit from Coverlet being able to work more seamlessly with systems, projects and others using parrellism in code testing.
Desired Change Results
The goal of these changes are as follows:
Fell free to ask me any questions if something is unclear.