Forum Discussion

sinis's avatar
sinis
Contributor
2 years ago

MSTest Configuration

While doing MSTest, Is there criteria in which Visual Studio version it should be created? I tried it in Visual Studio 2017 and it is not working. 

  • Got it working,

    The unit test project must contain the following references,

    for MSTest to work.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    See https://learn.microsoft.com/en-us/visualstudio/test/run-a-unit-test-as-a-64-bit-process?view=vs-2022


    MSTest.exe is 32 bit

     

    Sigcheck v2.90 - File version and signature viewer
    Copyright (C) 2004-2022 Mark Russinovich
    Sysinternals - www.sysinternals.com
    
    c:\program files\microsoft visual studio\2022\professional\common7\ide\MSTest.exe:
            Verified:       Signed
            Signing date:   19:45 06/04/2023
            Publisher:      Microsoft Corporation
            Company:        Microsoft Corporation
            Description:    Test Execution Command Line Tool
            Product:        Microsoft« Visual Studio«
            Prod version:   17.0.33606.225
            File version:   17.0.33606.225
            MachineType:    32-bit

     

     

    • sinis's avatar
      sinis
      Contributor

      No, I am using this 

       

      whenever I try to run this, There is error showing like "no test to execute". And inside the options in TestComplete, we give MSTest.exe to make MS tests run 

      And when I checked Internet, I found that this issue is common and now most of the tests are run using vsconsole.exe and MSTest is not used in latest versions of Visual Studio

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I'll have a look at this - I've just notice that the path doesn't look correct,

    It should be using '\' backslash?

    • sinis's avatar
      sinis
      Contributor

      Corrected, but still the same issue

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Are you able to run,

     

    mstest /testcontainer:[insert your .dll here]

     

    from the command prompt?

     

    I'm not able to run mstest because it's deprecated. I'm using VS2022

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Got it working,

    The unit test project must contain the following references,

    for MSTest to work.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Since mstest.exe deprecated, it's worth requesting SmartBear to update to use vstest.console.exe.

     

     

    • sinis's avatar
      sinis
      Contributor

      rraghvani when I try to run mstests, this error is coming. Can we only run tests which are build in Any CPU configuration inside testcomplete? I have build the assembly in x64 bit.

       

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    If your application under test is x64, then you must use TestComplete x64. 

    • sinis's avatar
      sinis
      Contributor

      I have been using TestComplete x64. But inside visual studio , I have given platform target as x64. When I am running with this platform, there is error in test complete. But when I use " Any CPU" as platform , it is working fine. But for my application, it is necessary that I need to use x64. I am thinking whether MSTest.exe is configured to run 32 bit DLLs.