Turning on/off and saving update of Bullseye - bullseye

I want to use bullseye code coverage in my dos script.
And I have written below code. The test.cov file is created but result is not generated on test.cov.
SET MY_LOCAL_COV_FILE=c:\test.cov
SET COVFILE=%MY_LOCAL_COV_FILE%
SET COVBUILDZONE=%BUILD_NUMBER%
covselect --file "%MY_LOCAL_COV_FILE%" --add c:
cov01 --on
MSBuild ".\my.sln" /t:clean /p:Configuration="Debug"
cov01 --off

I think you have two problems.
You are not building the code, you have only run the 'clean' target from MSBuild, try running 'rebuild' which will clean and then compile the code so the code coverage instrumentation is inserted.
You are not running the built code so Bullseye can't get any meaningful coverage information. Before the 'conv01 --off' try running your executable, or unit test, or whatever it is you have built.

Related

Unable to run/debug robot tests in vscode - robocorp extensions installed

I have installed Robocorp Code as well as Robot Framework Language Server and have configured them. However, I am still having errors when trying to run the tests via the code lens options.
Repo - A webapi repo with a specific folder containing all tests. Lets call it regression.
RF - 4.1.3
Python - 3.8
This is what happens when I click on Run on the code lens for any of the tests -
`PS C:\git\xxxx\regression> C:; cd 'C:\git\xxxx\regression'; &
'C:\Users\xxxx\AppData\Local\Temp\rf-ls-run\run_env_00_smh5defr.bat'
'-u'
'c:\Users\xxxx.vscode\extensions\robocorp.robotframework-lsp-0.47.2\src\robotframework_debug_adapter\run_robot__main__.py'
'--port' '54331' '--no-debug' '--argumentfile'
'C:\git\xxxx\regression\args-local.txt' '--pythonpath'
'c:\git\xxxx\regression\common\lib' '--variable'
'EXECDIR:C:/git/xxxx/regression'
'--prerunmodifier=robotframework_debug_adapter.prerun_modifiers.FilteringTestsSuiteVisitor'
'c:\git\xxxx\regression\api\api_Test.robot'
[ ERROR ] Parsing'--pythonpath' failed: File or directory to execute does not exist.
However, the test starts if I remove the argumentfile parameter but it, of course, fails because its missing arguments from the file.
Do note that the folder specified in pythopath exists and has some python libraries needed for the tests.

How to debug unit test while developping a package in Julia

Say I develop a package with a limited set of dependencies (for example, LinearAlgebra).
In the Unit testing part, I might need additional dependencies (for instance, CSV to load a file). I can configure that in the Project.toml all good.
Now from there and in VS Code, how can I debug the Unit tests? I tried running the "runtests.jl" in the debugger; however, it unsurprisingly complains that the CSV package is unavailable.
I could add the CSV package (as a temporary solution), but I would prefer that the debugger run with the configuration for the unit testing; how can I achieve that?
As requested, here is how it can be reproduced (it is not quite minimal, but instead I used a commonly used package as it give confidence the package is not the problem). We will use DataFrames and try to execute the debugger for its unit tests.
Make a local version of DataFrames for the purpose of developing a feature in it. I execute dev DataFrames in a new REPL.
Select the correct environment (in .julia/dev/DataFrames) through the VS-code user interface.
Execute the "proper" unit testing by executing test DataFrames at the pkg prompt. Everything should go smoothly.
Try to execute the tests directly (open the runtests.jl and use the "Run" button in vs-code). I see some errors of the type:
LoadError: ArgumentError: Package CategoricalArrays not found in current path:
- Run `import Pkg; Pkg.add("CategoricalArrays")` to install the CategoricalArrays package.
which is consistent with CategoricalArrays being present in the [extras] section of the Project.toml but not present in the [deps].
Finally, instead of the "Run" command, execute the "Run and Debug". I encounter similar errors here is the first one:
Test Summary: | Pass Total
merge | 19 19
PASSED: index.jl
FAILED: dataframe.jl
LoadError: ArgumentError: Package DataStructures not found in current path:
- Run `import Pkg; Pkg.add("DataStructures")` to install the DataStructures package.
So I can't debug the code after the part requiring the extras packages.
After all that I delete this package with the command free DataFrames at the pkg prompt.
I see the same behavior in my package.
I'm not certain I understand your question, but I think you might be looking for the TestEnv package. It allows you to activate a temporary environment containing the [extras] dependencies. The discourse announcement contains a good description of the use cases.
Your runtest.jl file should contain all necessary imports to run tests.
Hence you are expected to have in your runtests.jl file lines such as:
using YourPackageName
using CSV
# the lines with tests now go here.
This is a standard in Julia package layout. For an example have a look at any mature Julia such as DataFrames.jl (https://github.com/JuliaData/DataFrames.jl/blob/main/test/runtests.jl).

The specified task executable "postsharp.4.0-x86.exe" could not be run. The filename or extension is too long

PostSharp build step fails with
The specified task executable "postsharp.4.0-x86.exe" could not be
run. The filename or extension is too long
when run on build machine or locally with PostSharpHost=Native.
The cause looks to be the large number of references passed to postsharp.4.0-x86.exe via /P:ResolvedReferences parameter.
It works fine locally when using default PostSharpHost=PipeServer. However, PipeServer value is being ignored on build machine when build is run in non-interactive mode.
What are the options to resolve this issue? Is is possible to force using PipeServer on the build machine in non-interactive mode?
Here is a fragment from build log causing the issue:
C:\ProgramData\PostSharp\3.1.73\bin.Release\postsharp.4.0-x86.exe obj\Release\Before-PostSharp\Xxx.xxxxxxxxxxxxxxx.dll /X:default /NoLogo /L:44054-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /P:Output=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\obj\Release\Xxx.xxxxxxxxxxxxxxx.dll /P:ReferenceDirectory=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.Xxxxx.XxxxXxxxx /P:Configuration=Release /P:Platform=AnyCPU "/P:SearchPath=..\bin\|obj\Release\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\ " /P:IntermediateDirectory=obj\Release\PostSharp /P:CleanIntermediate=False /P:MSBuildProjectFullPath=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\Xxx.Xxxxx.XxxxXxxxx.csproj /P:SignAssembly=False /P:PrivateKeyLocation= /P:PrivateKeyContainer= /P:DelaySign= "/P:ResolvedReferences=C:\Dev\Xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\AWSSDK.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntax.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntaxCs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Windsor.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\FileHelpers.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Core\lib\net40\FSharp.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Data\lib\net40\FSharp.Data.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.CSharp\lib\net45\FsPickler.CSharp.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler\lib\net45\FsPickler.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.Json\lib\net45\FsPickler.Json.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsUnit\Lib\Net40\FsUnit.NUnit.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxg\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxg\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxx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\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxn\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxl\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Xxx.xxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxl\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-
The issue has been fixed in PostSharp 4.2.14. Please update to the latest version.

Gallio with NCover shows 0% code coverage in Sonar UI

I am using sonar-runner to run tests and code coverage over my C# code with the help of gallio plugin. The tests are running fine, but I am not able to see any code coverage on the sonar web UI.
My Sonar settings are as follows:
sonar-project.properties
mentioning only relevant bits
sonar.gallio.coverage.tool = NCover
sonar.NCover.installDirectory = C:/Program Files/NCover
sonar.donet.visualstudio.testProjectPattern = .Test
sonar.dotnet.buildConfigurations = "Release|x86"
Any idea what coule be missing??
sonar.projectKey=XXX:XXX
sonar.projectVersion=trunk
sonar.projectName=XXX
sources=.
sonar.language=cs
sonar.dotnet.visualstudio.solution.file=Project.sln
sonar.dotnet.excludeGeneratedCode=false
sonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319
sonar.dotnet.version=4.0
# Gallio
sonar.gallio.mode=
sonar.gallio.coverage.tool=NCover
sonar.gallio.runner=IsolatedAppDomain
sonar.NCover.installDirectory=c:/Program Files/NCover
sonar.gallio.installDirectory=C:/Program Files/Gallio
sonar.dotnet.test.assemblies=$(SolutionDir)/../**/bin/**/*.Tests.Unit.dll
# FXCop
sonar.fxcop.mode=
#StyleCop
sonar.stylecop.mode=
#NDeps
sonar.ndeps.mode=skip
sonar-runner.properties
You said
sonar.dotnet.buildConfigurations = "Release|x86"
If that's true, your build likely isn't generating .pdb files, which are needed to figure out the mapping between the binaries and your source files.
Does it work if you try it with a Debug build?
I was seeing this same behavior with NCover in Sonar. I found that Sonar was generating invalid arguments for Gallio's NCover runner.
Try piping the output from Sonar's runner into a text file so that you can examine the arguments more easily (on the command line, you can just type sonar-runner > output.txt to do this).
You will likely see a line like this in your output:
INFO .u.c.CommandExecutor - Executing command: C:\Program Files\Gallio\bin\Gallio.Echo.exe /r:Local /report-directory:E:\Reports\.sonar /report-name-format:gallio-report /report-type:Xml E:\Projects\UnitTests\bin\Release\UnitTests.dll /runner-property:NCoverCoverageFile=E:\Reports\.sonar\coverage-report.xml /runner-property:NCoverArguments=//ias MyFirstAssembly;MySecondtAssembly;MyThirdAssembly
If you attempt to execute this manually via Gallio on the command line, you will get an error:
Cannot find file 'MyFirstAssembly;MySecondtAssembly;MyThirdAssembly'
If you edit this list manually down to a single entry such as MyFirstAssembly*, everything will work as expected.
This seems to indicate that Sonar is generating invalid command line arguments for Gallio. As much as I love NCover, the easiest solution was to use OpenCover instead.

CoffeeScript build setup that supports unit testing?

I want to use CoffeeScript for building what will essentially be a JavaScript library.
I would just like to be able to
define some classes, with inheritance
keep my code in several files
write some unit tests (QUnit or whatever works, preferably writing tests in CoffeeScript)
(ideally) have the project watched and built automatically while I work
This seems reasonable, no? My plan is just having the unit tests run against the compiled JavaScript, in a browser, although if I can run them straight in node.js that's even better.
Currently I'm trying to do this with CoffeeToaster and QUnit, using two different CoffeeToaster configurations, one with tests and one without. It is working, but perhaps somebody has a better suggestion? Should I ditch CoffeeToaster and do it with Cake? Or get another unit testing framework? Can anybody point me to a tutorial for this? I'm making a clientside JS lib, so I don't want to involve Rails etc.
I'm currently using:
Mocha as the test runner and should.js for assertions;
Mockery to intercept certain require calls for isolated testing with mocks/stubs of required libraries;
*JSCoverage for instrumenting the code for code coverage reports.
My code lives in src/ and I write my tests in CoffeeScript. I use make to build and test the code.
make build compiles the CoffeeScript in src/ to JavaScript in lib/.
make test builds the code and then runs the tests in test/.
make monitor watches and runs the tests as soon as they change. Unfortunately it doesn't recompile the code. I use a Vim keybinding to call make, which also triggers Mocha to re-run the tests.
Edit: If this bothers you, you could run coffee --watch -o lib/ -c src/.
make coverage generates a code coverage report and puts it in lib-cov/report.html.
My Makefile looks somewhat like this:
COFFEE = ./node_modules/.bin/coffee --compile
MOCHA = NODE_ENV=test ./node_modules/.bin/mocha
MOCHA_OPTS = \
--compilers coffee:coffee-script \
--require should \
--colors
REPORTER = spec
build:
#$(COFFEE) --output lib/ src/
test: build
#$(MOCHA) --reporter $(REPORTER) $(MOCHA_OPTS)
monitor:
#$(MOCHA) --reporter min $(MOCHA_OPTS) \
--watch --growl
coverage: instrument
#MYLIB_COV=1 $(MOCHA) $(MOCHA_OPTS) \
--reporter html-cov > lib-cov/report.html
instrument: build
#rm -rf ./lib-cov
#jscoverage ./lib ./lib-cov
.PHONY: build test monitor coverage instrument
You could probably use the above with very little modification.
To generate the coverage report with make coverage, the tests must be run against the instrumented code in lib-cov/ instead of the code in lib/. To make this possible, three things are needed:
The Makefile should set an environment variable, like MYLIB_COV (change the name as you like).
Your index.js should look at this environment variable and require either lib/ or lib-cov/ accordingly:
// index.js
module.exports = process.env.MYLIB_COV
? require('./lib-cov/mylib')
: require('./lib/mylib');
If you need exports from multiple source files, you can combine them here. If you have something other than index.js as 'main' in your package.json, don't forget to change it.
Your tests should require '../':
# test/test.user.coffee
describe 'User', ->
User = {}
before ->
{User} = require '../'
describe '#equals()', ->
describe 'when users have the same username and host', ->
it 'should return true', ->
user1 = new User 'user', 'some.host.foo'
user2 = new User 'user', 'some.host.foo'
user1.equals(user2).should.be.true
# etc.
I'll leave it as an exercise to the reader to find out whether they need Mockery and how to use it if they do. I will point out, though, that the require call in the test snippet above is done inside before for a reason.
Happy coding!