Gathering detailed insights and metrics for gulp-nunit-runner
Gathering detailed insights and metrics for gulp-nunit-runner
Gathering detailed insights and metrics for gulp-nunit-runner
Gathering detailed insights and metrics for gulp-nunit-runner
npm install gulp-nunit-runner
Typescript
Module System
Node Version
NPM Version
51.5
Supply Chain
91.9
Quality
70
Maintenance
50
Vulnerability
96.2
License
JavaScript (100%)
Total Downloads
195,808
Last Day
14
Last Week
305
Last Month
1,432
Last Year
18,322
7 Stars
130 Commits
9 Forks
2 Watching
2 Branches
6 Contributors
Latest Version
1.2.3
Package Id
gulp-nunit-runner@1.2.3
Unpacked Size
19.61 kB
Size
7.15 kB
File Count
5
NPM Version
5.7.1
Node Version
8.6.0
Cumulative downloads
Total Downloads
Last day
-82.1%
14
Compared to previous day
Last week
-1.6%
305
Compared to previous week
Last month
36.8%
1,432
Compared to previous month
Last year
6.4%
18,322
Compared to previous year
5
7
A Gulp.js plugin to facilitate running NUnit tests on .NET assemblies. Much of this work was inspired by the gulp-nunit plugin.
From the root of your project (where your gulpfile.js
is), issue the following command:
1npm install --save-dev gulp-nunit-runner
The plugin uses standard gulp.src
globs to retrieve a list of assemblies that should be tested with Nunit. By default the plugin looks for the NUnit console runner in your PATH
. You can optionally specify the NUnit bin
folder or the full path of the runner as demonstrated below. You should add {read: false}
to your gulp.src
so that it doesn't actually read the files and only grabs the file names.
1var gulp = require('gulp'), 2 nunit = require('gulp-nunit-runner'); 3 4gulp.task('unit-test', function () { 5 return gulp.src(['**/*.Test.dll'], {read: false}) 6 .pipe(nunit({ 7 executable: 'C:/nunit/bin/nunit-console.exe', 8 })); 9}); 10
This would result in the following command being executed (assuming you had Database and Services Test assemblies.)
1C:/nunit/bin/nunit-console.exe "C:\full\path\to\Database.Test.dll" "C:\full\path\to\Services.Test.dll"
Note: If you use Windows paths with \
's, you need to escape them with another \
. (e.g. C:\\nunit\\bin\\nunit-console.exe
). However, you may also use forward slashes /
instead which don't have to be escaped.
You may also add options that will be used as NUnit command line switches. Any property that is a boolean true
will simply be added to the command line, String values will be added to the switch parameter separated by a colon and arrays will be a comma seperated list of values.
For more information on available switches, see the NUnit documentation:
http://www.nunit.org/index.php?p=consoleCommandLine&r=2.6.3
1var gulp = require('gulp'), 2 nunit = require('gulp-nunit-runner'); 3 4gulp.task('unit-test', function () { 5 return gulp.src(['**/*.Test.dll'], {read: false}) 6 .pipe(nunit({ 7 executable: 'C:/nunit/bin/nunit-console.exe', 8 options: { 9 nologo: true, 10 config: 'Release', 11 transform: 'myTransform.xslt' 12 } 13 })); 14});
This would result in the following command:
1C:/nunit/bin/nunit-console.exe /nologo /config:"Release" /transform:"myTransform.xslt" "C:\full\path\to\Database.Test.dll" "C:\full\path\to\Services.Test.dll"
Below are all available options. With the release of NUnit 3.x, some options have been removed and some added. Version specific options have been labeled with the version they apply to. For more information on deprecated options see here. For more information on new options see here.
1nunit({ 2 3 // The NUnit bin folder or the full path of the console runner. 4 // If not specified the NUnit bin folder must be in the `PATH`. 5 executable: 'c:/Program Files/NUnit/bin', 6 7 // [2.x] If the full path of the console runner is not specified this determines 8 // what version of the console runner is used. Defaults to anycpu. 9 // NOTE: This has been superseded by the 'x86' option below in 3.x. 10 // http://www.nunit.org/index.php?p=nunit-console&r=2.6.3 11 platform: 'anycpu|x86', 12 13 // [2.x] Output TeamCity service messages. 14 // NOTE: This has been superseded by the 'teamcity' option below in 3.x. 15 // https://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity 16 teamcity: true|false, 17 18 // Do not throw a gulp error and stop the stream on failing NUnit tests. 19 // This is useful on TeamCity, where tests can be muted after the tests 20 // are run, which allow the build to pass. 21 continueOnError: true|false, 22 23 // The options below map directly to the NUnit console runner. See here 24 // for more info: http://www.nunit.org/index.php?p=consoleCommandLine&r=2.6.3 25 options: { 26 27 // [3.x] Name of the test case(s), fixture(s) or namespace(s) to run. 28 test: ['TestSuite.Unit', 'TestSuite.Integration'], 29 30 // [3.x] Name of a file containing a list of the tests to run, one per line. 31 testist: 'TestsToRun.txt', 32 33 // [2.x] Name of the test case(s), fixture(s) or namespace(s) to run. 34 // NOTE: This has been superseded by the 'test' option above in 3.x. 35 run: ['TestSuite.Unit', 'TestSuite.Integration'], 36 37 // [2.x] Name of a file containing a list of the tests to run, one per line. 38 // NOTE: This has been superseded by the 'testlist' option above in 3.x. 39 runlist: 'TestsToRun.txt', 40 41 // [2.x] List of categories to include. 42 include: ['BaseLine', 'Unit'], 43 44 // [2.x] List of categories to exclude. 45 exclude: ['Database', 'Network'], 46 47 // [3.x] Test selection expression 48 where: 'cat != critical', 49 50 // Project configuration (e.g.: Debug) to load. 51 config: 'Debug', 52 53 // Process model for tests. 54 process: 'Single|Separate|Multiple', 55 56 // AppDomain Usage for tests. 57 domain: 'None|Single|Multiple', 58 59 // Framework version to be used for tests. 60 framework: 'net-1.1', 61 62 // [3.x] Run tests in a 32-bit process on 64-bit systems. 63 x86: true|false, 64 65 // [3.x] Dispose each test runner after it has finished running its tests. 66 "dispose-runners": true|false, 67 68 // Timeout for each test case in milliseconds. 69 timeout: 1000, 70 71 // [3.x] Random seed used to generate test cases. 72 seed: 5150, 73 74 // [3.x] Number of worker threads to be used in running tests. 75 workers: 5, 76 77 // Stop after the first test failure or error. 78 stoponerror: true|false, 79 80 // Wait for input before closing console window. 81 wait: true|false, 82 83 // [3.x] Pause before run to allow debugging. 84 pause: true|false, 85 86 // Work directory for output files. 87 work: 'BuildArtifacts', 88 89 // File to receive test output. 90 output: 'TestOutput.txt', 91 92 // File to receive test error output. 93 err: 'TestErrors.txt', 94 95 // Name of XML result file (Default: TestResult.xml) 96 result: 'TestResult.xml', 97 98 // [3.x] Save test info rather than running tests. Name of output file. 99 explore: 'TestInfo.xml', 100 101 // Suppress XML result output. 102 noresult: true|false, 103 104 // Label each test in stdOut. 105 labels: true|false, 106 107 // Set internal trace level. 108 trace: 'Off|Error|Warning|Info|Verbose', 109 110 // [3.x] Tells .NET to copy loaded assemblies to the shadowcopy directory. 111 shadowcopy: true|false, 112 113 // [2.x] Disable shadow copy when running in separate domain. 114 // NOTE In 3.x, The console runner now disables shadow copy by 115 // default. use new 'shadowcopy' option in 3.x to turn it on. 116 noshadow: true|false, 117 118 // [3.x] Turns on use of TeamCity service messages. 119 teamcity: true|false, 120 121 // [3.x] Suppress display of program information at start of run. 122 noheader: true|false, 123 124 // [3.x] Displays console output without color. 125 nocolor: true|false, 126 127 // [3.x] Display additional information as the test runs. 128 verbose: true|false, 129 130 // [2.x] Do not display the logo. 131 nologo: true|false, 132 133 // [2.x] Do not display progress. 134 nodots: true|false, 135 136 // [2.x] Apartment for running tests (Default is MTA). 137 apartment: 'MTA|STA', 138 139 // [2.x] Disable use of a separate thread for tests. 140 nothread: true|false, 141 142 // [2.x] Base path to be used when loading the assemblies. 143 basepath: 'src', 144 145 // [2.x] Additional directories to be probed when loading assemblies. 146 privatebinpath: ['lib', 'bin'], 147 148 // [2.x] Erase any leftover cache files and exit. 149 cleanup: true|false 150 151 } 152});
mono
command to execute the nunit-console.exe
on non-windows systems (dbones).npmignore
child_process::spawn
, much simpler command building.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/26 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More