telerik test studio xUnit dotnet test not working

1 Answer 32 Views
Coded Tests Test Execution VS Plugin WPF Testing
Yeongseok
Top achievements
Rank 1
Iron
Iron
Yeongseok asked on 13 Nov 2023, 05:32 AM | edited on 13 Nov 2023, 05:50 AM

It seems like you've created a test project targeting .NET Framework 4.8 using xUnit in Visual Studio 2022, and the tests run successfully within the IDE, but you encounter errors when using dotnet test command.


> dotnet test

D:\Workspace\Project\DataManager_Repositories\DM-Foundry\Test_Client\Foundry\Foundry.csproj(145,3): error MSB4019: Imported project "C:\ProgramFiles\dotnet\sdk\7.0.400\Telerik\WebUITestStudio\Telerik .WebUITestStudio.targets" not found. Make sure the expression in the import declaration "C:\Program Files\dotnet\sdk\7.0.400\\Telerik\WebUITestStudio\Telerik.WebUITestStudio.targets" is correct and the file exists on disk.

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 15 Nov 2023, 09:33 AM

Hello Yeongseok,

Test Studio tests targets .Net Framework 4.7.2 (if working on your project in Visual Studio you can also set the project to target .Net Framework 4.8). 

The dotnet tool which you are trying to use applies to .Net Core 3.1 SDK and above - check Microsoft documentation for reference. With that said this is not the suitable CLI command to use for running the tests outside of Visual Studio. 

For running the Test Studio tests from CLI you can use the VSTest.Console.exe - see the necessary configuration here

I hope this information is useful for you. 

Regards,
Elena
Progress Telerik

Virtual Classroom is the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products including Telerik Test Studio! Check it out at https://learn.telerik.com/.
Tags
Coded Tests Test Execution VS Plugin WPF Testing
Asked by
Yeongseok
Top achievements
Rank 1
Iron
Iron
Answers by
Elena
Telerik team
Share this question
or