Bug Report T715055
Visible to All Users

Code Coverage – The System.InvalidProgramException exception is raised when running tests

created 6 years ago (modified 6 years ago)

Hallo

i am currently evaluationg your product. Today i have an issue, that the code coverage does not longer work with my last two tests i created.
The tests :
run and debug when executed manually
run and debug by MS Test

–>---------------TestRunner-----
Test started…
Ignored: Ews.TimeTracking.Tests.PlayAroundTests.TestMethod1
Ignored: Ews.TimeTracking.Tests.PlayAroundTests.LoadSomething
Ignored: Ews.TimeTracking.Tests.PlayAroundTests.Dooooo
Failed: Ews.TimeTracking.Tests.EntityFrameworkTests.TimeTrackingServiceTests.save_worksteps_should_save_given_workstep
  Test method Ews.TimeTracking.Tests.EntityFrameworkTests.TimeTrackingServiceTests.save_worksteps_should_save_given_workstep threw exception:
System.InvalidProgramException: Die Common Language Runtime hat ein ungültiges Programm gefunden.
TimeTracking.EF\TimeTrackingService.cs(83, 0) : EWS.TimeTracking.EF.TimeTrackingService.SaveWorkStep(WorkStepEntity workStep)
Tests\EnitityFrameworkTests\TimeTrackingServiceTests.cs(344, 0) : Ews.TimeTracking.Tests.EntityFrameworkTests.TimeTrackingServiceTests.save_worksteps_should_save_given_workstep()
Failed: Ews.TimeTracking.Tests.EntityFrameworkTests.TimeTrackingServiceTests.save_workstep_twice_should_not_be_work
  Test method Ews.TimeTracking.Tests.EntityFrameworkTests.TimeTrackingServiceTests.save_workstep_twice_should_not_be_work threw exception:
System.InvalidProgramException: Die Common Language Runtime hat ein ungültiges Programm gefunden.
TimeTracking.EF\TimeTrackingService.cs(83, 0) : EWS.TimeTracking.EF.TimeTrackingService.SaveWorkStep(WorkStepEntity workStep)
Tests\EnitityFrameworkTests\TimeTrackingServiceTests.cs(397, 0) : Ews.TimeTracking.Tests.EntityFrameworkTests.TimeTrackingServiceTests.save_workstep_twice_should_not_be_work()
TelemetryTimeTakenInSecByAdaptersToRunTests,executor://mstestadapter/v2,26,7375982
 Summary: Passed: 42, Failed: 2, Ignored: 3
Duration: 30.08 seconds

----------------MS Test ( run all) ------
[12.02.2019 15:57:13 Informational] ------ Run test started ------
[12.02.2019 15:57:40 Informational] ========== Run test finished: 47 run (0:00:26,7118281) ==========

Comments (1)
DevExpress Support Team 6 years ago

    Hi,

    Would you please try enabling the "Disable security transparency checks during JIT compilation" on the "Code Coverage" option page and letting us know of the results.

    Follow these steps to get to the Code Coverage options page:

    1. From the Visual Studio menu, select "CodeRush\Options…" .
    2. In the tree view on the left, navigate to "Unit Testing" folder.
    3. Select the "Code Coverage" options page.

    I look forward to hearing from you.

    Answers approved by DevExpress Support

    created 6 years ago (modified 6 years ago)

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Comments (1)
      DevExpress Support Team 6 years ago

        We have published the requested patched build and are looking forward to hearing about your results. Meanwhile, we would like to mark this ticket as Public, if you do not mind, to include it in the What's New lists for future maintenance updates.

        Other Answers

        created 6 years ago (modified 6 years ago)

        Hallo Eugene,

        somehow on the first approch it was working, or i didnt saw the failing tests .
        After playing around, the issue is not fixed.
        Runnung "all tests" in the test class , all tetst will run thru

        best regards Christian

          Show previous comments (3)
          DevExpress Support Team 6 years ago

            Hi Christian,

            Thank you for sending us the project.
            We will research it and contact you again.

            I've noticed that the ticket has the "Public" status.
            In this case, the attached project can be visible for other people too.
            I recommend you make this ticket Private to exclude the possibility of downloading your project by a third party.

              i guess it is private now

              DevExpress Support Team 6 years ago

                Hi Christian,

                I've reproduced the problem on my side.
                I see 2 failed test cases and I see the exception in the output window.

                Please give us some time for the further research.
                We will contact you once we get any information.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.