0

I am building the project and running test cases in appveyor. After successfully executing test cases the coverage data must be uploaded to coveralls. But in my case no error is thrown but coverage is being recorded.

The details of my project are

.Net Core 1.1.0 Visual Studio 2017 xunit - 2.2.0 OpenCover - 4.6.519 coveralls.net - 0.7.0

My appveyor.yml is as below :

version: 1.0.{build}
os: Visual Studio 2017
skip_tags: true
configuration: Release
environment:
 nodejs_version: "0.12"
COVERALLS_REPO_TOKEN:
  secure: rstgrtert
cache:
- "%LOCALAPPDATA%\\Yarn"
install:
- npm i -g yarn@0.16.1
- npm i -g typescript typings
- yarn global add typescript typings
- cd ".\Promact.Oauth.Server\src\Promact.Oauth.Server\"
- yarn
- cd..
- cd..
build_script:
- ps: dotnet restore
build:
project: .\Promact.Oauth.Server\Promact.Oauth.Server.sln
verbosity: minimal
test_script:
- cd ".\src\"
- ps: >-
 C:\Users\appveyor\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe-target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test -f netcoreapp1.1 -c Release .\Promact.Oauth.Server.Tests\Promact.Oauth.Server.Tests.csproj" -mergeoutput -hideskipped:File -output:opencover.xml -oldStyle -filter:"+[Promact.Oauth.Server]*Repository -[Promact.Oauth.Server.Tests*]*" -register:user
if(![string]::IsNullOrEmpty($env:COVERALLS_REPO_TOKEN)){

$coveralls = (Resolve-Path "C:\Users\appveyor\.nuget\packages\coveralls.net\0.7.0\tools\csmacnz.coveralls.  exe").ToString()

& $coveralls --opencover -i opencover.xml --repoToken 
$env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID

}

In appveyor it runs the test and simply shows

 Committing...
No results, this could be for a number of reasons. The most common reasons are:
    1) missing PDBs for the assemblies that match the filter please review the
    output file and refer to the Usage guide (Usage.rtf) about filters.
    2) the profiler may not be registered correctly, please refer to the Usage
    guide and the -register switch.
Coverage data uploaded to coveralls.

link to the appveyor build

  • I would recommend to access AppVeyor build worker with RDP on build finish (https://www.appveyor.com/docs/how-to/rdp-to-build-worker/) and try to run those commands manually. Note however that AppVeyor environment variables are not available in RDP, so you need to print them in script (except secure ones like COVERALLS_REPO_TOKEN!!!) to construct correct command. In RDP you will be able to try different command options (with no filters for example) and find working ones. Also look at https://www.appveyor.com/blog/2017/03/17/codecov/. And note that build time limit (so RDP session too) is 1 hr. – Ilya Finkelsheyn Apr 12 '17 at 22:00
  • Thanks for your reply. I found the issue in my case was the OpenCover version. That is OpenCover 4.6.519 didn't support dotnet Core 1.1. I updated OpenCover 4.6.589 and it worked just fine. – Julie John Apr 17 '17 at 02:54

0 Answers0