Forum member

simongh

26 posts

Posts by simongh

  1. OpenCover report

    I suspect it's more something up with sonar. The checkout does a GIT clean -dxf, so should have removed all untracked files. Unless I tell the build server to do a clean checkout though, it fails even with the build configuration running as release. I don't think I've entirely figured out what's up …

  2. OpenCover report

    I think I've solved it. We run the following steps because Sonar needs the code to be built with its instrumentation enabled: Sonar start NCrunch .net build sonar end Ncrunch runs with UseBuildConfiguration config set to Release, whereas the .net build was missing that, so it built a deb…

  3. OpenCover report

    That's ok, I wasn't exactly clear with what I said. I've shared the 2 opencover files with you. The addin file was generated by using the export function in the Ncrunch tests window. The console file was using the console tool. Both are 4.18.0.3.

  4. OpenCover report

    Thanks, appreciate your input on this. My assumption was that the NCrunch addin vs the console tool would be built from the same code, so shouldn't generate significantly different files. I'll post my my opencover files to Sonar & see what they have to say.

  5. OpenCover report

    I've been posting over in Sonar about this, with no success. However, I have managed to setup a test project & do the Sonar scan. This is when it gets weird. If I use the Ncrunch console tool to generate the opencover.xml, sonar won't read it. If I export the opencover file from within vs2022,…

  6. OpenCover report

    Thanks for your help. Your comments around partcover reinforce what I was thinking. OpenCover has been retired, as it's not really supported any more. I had considered seeing about getting coverlet working. It's just convenient that NCrunch generates the file. I'll get in touch with Sonar & see i…

  7. OpenCover report

    That would be helpful. I'm not entirely sue what I am looking for in the opencover xml and it's a big file.

  8. OpenCover report

    I'm trying to use the data generated by NCrunch with SonarCloud. Are tests are written in XUnit the build is being run by TeamCity. I can feed it the test results in NUnit format report & it seems happy with that. When I try to feed it the OpenCover.xml report, I get errors about the line number.…

  9. Inclusively/Exclusively uses attribute

    Thanks, I think I better understand it now. I hadn't fully appreciated that NCrunch achieves the parallel execution with concurrent processes not threads. This means the static state of flags won't affect other running tests. I've removed all the exclusively uses from the tests, & as you can imag…

  10. Inclusively/Exclusively uses attribute

    Thanks. We use feature flags across our codebase. These are accessed from a static class & each flag is an interface. When the app starts, it loads config in & creates an instance for each flag, which as the code runs it can then see if the flag is enabled. When we write a test, we mock the state…

  11. Inclusively/Exclusively uses attribute

    Thanks for replying. I think I understand what Inclusively uses does. It's only really useful against the Exclusively uses attribute. Our feature flags are static, so if a test has a flag set off, any test with the flag set on should not run, but any test that also has the flag set off should be …

  12. Inclusively/Exclusively uses attribute

    Also, what happens when multiple resources are specified? Is it mutually exclusive to all resources or any resource?

  13. Inclusively/Exclusively uses attribute

    Reading through the docs again, could this work? For a test where the flag is on, use InclusivelyUses(feature1_off) to make it mutually exclusive to those tests where the flag is off by using.

  14. Inclusively/Exclusively uses attribute

    I've got a fairly interesting problem & I'm not sure if I'm reading the documentation on these attributes right. Exclusively uses lets you specify an arbitrary label and ensure that no other tests using that same label & attribute will run at the same time. How does Inclusively Uses fit in? Is…

  15. TeamCity NCrunch console run still fails with Nuget restore error

    I've just been bashing my head against a brick wall with this one & thought I'd add this, in case it helps anyone else. If you use the nuget installer step in TeamCity, it stores the cached copies of the packages in a different location to that used by dotnet restore or dotnet build. c:\users…

  16. NCrunch Console Invalid Cast

    We use just zip deployment. We're currently using 15.7.5 of the build tools

  17. NCrunch Console Invalid Cast

    Using winmerge. Everything comes back as identical. We're using TeamCity Professional 2018.1.1 (build 58406) triggering ncrunch from a commandline

  18. NCrunch Console Invalid Cast

    I've just upgraded our Teamcity to use the 3.21 release of the console tool and we're getting the below error: System.InvalidCastException: [A] cannot be cast to [B] . Type A originates from 'nCrunch.VSAddIn, Version=3.21.0.6, Culture=neutral, PublicKeyToken=01d101bf6f3e0aea' in the context 'Defa…

  19. Upgraded Web Project Not Building

    It seems this: ProjectSection(ProjectDependencies) = postProject {B3541D0B-45F3-483C-9574-428E153C4BB1} = {B3541D0B-45F3-483C-9574-428E153C4BB1} EndProjectSection in the solution file for the project along with <CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesTo…

  20. Upgraded Web Project Not Building

    hmmm. There's no csproj.nuget.cache, etc being generated for the project. I'm not sure how it build on my machine, because they're not generated there either. But it's the only difference between the proj files that build and those that don't. It's also a problem with the nuget files that is being r…