- Overview
- Guides
- Concepts
- Considerations And Constraints
- Absolute File References
- Assembly Colocation Assumptions
- Concurrent Use Of Test Resources
- Cross Application Domain Testing
- Heavily Executed Code Under Test
- Implicit File Dependencies
- Multi Threaded Tests
- Netstandard Test Projects
- Project Atomicity
- Project Build Platform And Configuration
- Rdi Data Point Location
- Test Atomicity
- Unique Test Names
- Using NCrunch With Source Control
- Reference
- Global Configuration
- Overview
- Auto Adjust Clashing Marker Colours
- Build Log Verbosity
- Build Process Memory Limit
- Capabilities Of This Computer
- Coverage Marker Style
- Cpu Cores Assigned To NCrunch Or Ide
- Custom Environment Variables
- Disable Global Hotkey
- Engine Hosting Strategy
- Fast Lane Threads
- Fast Lane Threshold
- Grid Maximum Reconnection Attempts
- Grid Reconnection Delay
- Impact Detection Mode
- Listening Port
- Log To Output Window
- Logging Verbosity
- Marker Colours
- Max Failing Test Trace Log Size
- Max Number Of Processing Threads
- Max Passing Test Trace Log Size
- Max Test Runners To Pool
- NCrunch Tool Window Colors
- Node Id (Name)
- Password
- Performance Aggregation Type
- Performance Display Sensitivity
- Pipeline Optimisation Priority
- Rdi Storage Settings
- Sliding Build Delay
- Snapshot Storage Directory
- Solution Storage Data Limit
- Spinner Colours
- Terminate Test Runners On Complete
- Test Process Memory Limit
- Tests To Execute On This Machine
- Text Output Font
- Workspace Base Path
- Solution Configuration
- Overview
- Additional Files For Grid Processing
- Additional Files To Include
- Allow Parallel Test Execution
- Allow Tests In Parallel With Themselves
- Infer Project References Using Assembly
- Instrumentation Mode
- NCrunch Cache Storage Path
- Only Consider Tests Outofdate If Impacted
- Project Config File Storage Path
- Show Coverage For Tests
- Show Metrics For Tests
- Tests To Execute Automatically
- Project Configuration
- Overview
- Additional Files To Include
- Allow Dynamic Code Contract Checks
- Allow Static Code Contract Checks
- Analyse Line Execution Times
- Autodetect Nuget Build Dependencies
- Build Priority
- Build Process Cpu Architecture
- Build Sdk
- Collect Control Flow During Execution
- Consider Inconclusive Tests As Passing
- Copied Project Dependencies
- Copy Referenced Assemblies To Workspace
- Custom Build Properties
- Data Storage File Size
- Default Test Timeout
- Detect Stack Overflow
- Enable Rdi
- Files Excluded From Auto Build
- Framework Utilisation Types
- Ignore This Component Completely
- Implicit Project Dependencies
- Include Static References In Workspace
- Instrument Output Assembly
- Method Data Limit
- Ms Test Thread Apartment State
- Preload Assembly References
- Prevent Signing Of Assembly
- Proxy Process File Path
- Rdi Cache Size
- Required Capabilities
- Restrict Tostring Usage
- Run Pre Or Post Build Events
- String Length Limit
- Track File Dependencies
- Use Build Configuration
- Use Build Platform
- Use Cpu Architecture
- Runtime Framework
- Overview
- Atomic Attribute
- Category Attribute
- Collect Control Flow Attribute
- Distribute By Capabilities
- Duplicate By Dimensions
- Enable Rdi Attribute
- Environment Class
- Exclusively Uses Attribute
- Inclusively Uses Attribute
- Isolated Attribute
- Method Data Limit Attribute
- Requires Capability Attribute
- Restrict Tostring Attribute
- Serial Attribute
- String Length Limit Attribute
- Timeout Attribute
- Uses Threads Attribute
- Global Configuration
- Troubleshooting
- Tools
- Keyboard Shortcuts
- Manual Installation Instructions
Workspaces
For NCrunch to be able to do its work without impacting other activities on the same machine, it needs to be able to set up temporary workspaces where it can perform its tasks in isolation.
Location
The path for these workspaces will default to your User\AppData\NCrunch directory, but you can also control this via the workspace base path configuration setting. If you are working on a machine with a large amount of memory space, it could be a huge advantage to have your workspaces stored on a virtualised RAM disk to reduce the whirring of the hard drive.
Structure and Considerations
When creating a workspace, NCrunch will automatically identify and copy all relevant project files to the workspace and arrange them using a directory structure that is (through relative paths) identical to the space from which they were taken. NCrunch will physically separate the project from its parent solution in order to build and test it independently. For this separation to be performed cleanly, NCrunch needs to be aware of all of the references from the workspaced project to any other projects within the solution.
If projects contain 'implicit' references to other files within the solution that NCrunch isn't able to automatically identify (for example, if tests in the project try to make use of a relative reference to files in a completely different project), the behaviour inside the workspace may not be the same as it would be in your original solution location. It's important that you let NCrunch know of all the files that a project needs in order to build and run its tests. You can do this by either ensuring all dependencies are included in the project file or by using the Additional files to include configuration setting.
Because each NCrunch workspace represents a project that has been fully extracted from its parent solution, projects being processed by NCrunch must be atomic and extractable.
Management and Cleanup
NCrunch will often build several copies of the same workspace to give itself space for parallel builds and test execution. The workspaces are carefully versioned and regularly updated from your source code while you change it, to ensure no strange build or test behaviour. There is physical separation in the naming of workspace directories to prevent different instances of your IDE from interfering with each other if they are each using NCrunch simultaneously. Workspaces will regularly be cleaned up when they are not in use, and NCrunch will also take care to delete orphaned workspaces that may be left behind by improperly terminated instances of your IDE.
Overhead
If you are working with a solution that requires a large amount of disk space (for example, if you have large database backups or spreadsheets included in your project files), you may find that your first few build tasks will take some time after NCrunch is first enabled. This is because of the overhead of copying large files across the hard drive while setting up workspaces. Once enough workspaces have been created for NCrunch to work efficiently, the processing time of build tasks should drop noticeably.
If you are experiencing issues with workspaces consuming too much disk space and you are making use of large NuGet packages, it may be worth disabling the Auto-detect NuGet Build Dependencies setting.