Test Suite is not running in Katalon Studio - web-services

I'm trying to execute test suite, but it is stuck at: Launching the test suite...
and when I click after 1 min it is not responding and closes.

I resolved this problem.
I followed these steps:
Reinstall KS.
Remove lib, bin, class path, project from Project folder.
Start KS
Refresh KS, Project>Refresh.
Now it is working how it should be.

Related

Running C Code from Github in Visual Studio

I wanted to play around with the Live Motion code I found on github at this link.
I am fairly new but I thought that all I need to do is clone and download the link. I opened it in VS code (I ran the hello world code in c++ so I assume I have configured it properly). I basically cloned the repository and all files and folders appeared as follows:
However, I am confused as to how I can run the entire project. Previously I would just click on the project name, build, and it would create the exe file. That doesn't seem to exist for cloning the repo.
I need some basic guidance to how I simply run the entire project from github.
I did install QT Creator 5.9.9 and it also shows up in my Visual Studio.
But I am still unsure about how to run the software and if anyone was able to get it to work?
Thanks

Building UWP app from command line

I need to create kind of builder for my Universal Windows App (UWP) application, that would load some configuration into it, build it and create app store package. Is there any way to build UWP app from command line, without associating it with the store and using Visual Studio at all?
There is WinAppDeployCmd, but it can be used to install builded appx package on device and I need tool like that to generate that package.
UPDATE
I've managed to build it and create app packages with command line, here is command I used:
msbuild "path to .csproj file" /p:OutDir=output_dir /p:AppxBundle=Always;AppxBundlePlatforms="x86|x64|ARM" /p:BuildAppxUploadPackageForUap=true
It's working but not as it should apparently. I can not install generated appx package on my phone (and emulator). I just get error
Failure reason: Failed to start deployment. Failure text: Install failed. Please contact your software vendor. (0x80073cf9)
I found many solutions for Windows 10 PC version, but there is only one solution I found for Windows 10 Mobile and this "solution" is to hard reset the phone, but I do not want to do that. Is there any other way?
And there is one more problem. This command doesn't work with parameter /p:Configuration=Release; and it only builds with Debug configuration, but I believe this is not related to previous error, because it doesn't work with Visual Studio either.
UPDATE
I could not find another solution, so I did the 'hard reset' of my phone and now it is working. It's sad, but I hope the reason is the Windows 10 Mobile OS is still in beta version.
Step 1 : See, you need to install .NET Framework installer from the below link. https://www.microsoft.com/en-us/download/details.aspx?id=30653
Step 2 : Go to C: drive and find where msbuild.exe is. You will find more msbuild. But mostly it will be in the location like C:\Windows\Microsoft.NET\Framework\v4.0.30319.
Step 3: Open the CMD in administrator and point to the location which is mentioned in Step 2.
Step 4 : Paste this. msbuild.exe "YourCompleteProjectPath.sln" /t:rebuild
See this for reference : https://msdn.microsoft.com/en-us/library/ms164311%28v=vs.85%29.aspx

Running Universal Windows unit tests from the command line

How do you run Universal Windows (UWP) unit test projects from the command line?
I am using the MSTestFramework.
Short answer:
vstest.console.exe /Platform:x64 AppPackages\UnitTestProject1_1.0.0.0_x64_Debug_Test\UnitTestProject1_1.0.0.0_x64_Debug.appx
Long answer:
Create the project by selecting Universal / Unit Test App (Universal Windows) template:
Build it with command line using in the folder where the solution file is
msbuild /p:Platform=x64;Configuration=Debug
Try running the vstest.console.exe command above, in the short answer. It will fail, giving the following error message:
error 0x800B0109: The root certificate of the signature in the app package or bundle must be trusted..
For more details look into Event Viewer under Applications and Services Logs -> Microsoft -> Windows -> AppXDeployment-Server -> Microsoft-Windows-AppXDeploymentServer/Operational.
To be able to run tests from command line, you need to use a certificate which has trusted root, or make the certificate that generated by visual studio trusted. For the latter, double click UnitTestProject1_TemporaryKey.pfx file from windows explorer, and follow the import wizard default steps, but change two things:
Set Store Location to local machine:
Place the certificate to Trusted Root Certification Authorities store:
Finishing the wizard should say "The import was successful."
Try running vstest.console.exe using the parameters in the short answer, and now it should run all your tests.
I followed Ivan Marinov's answer, but I needed a purely command-line solution. Once you have your UWP Unit Test Project working and you are ready to automate, follow these steps :
(I named my solution Win10Universal and my unit test project Win10-UnitTests. You will need to substitute the names in my examples with your own)
Open Command Prompt as an administrator and navigate into the same directory as your solution.
Run MSBuild.exe on your solution.
>"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" Win10Universal.sln /p:Platform=x86;Configuration=Release
The build process will generate a directory similar to {SolutionDirectory}/AppPackages/{UnitTestTargetProjectName}/{Something_Test}. Navigate into this directory and inside you will see a .cer Security Certificate.
>cd AppPackages/Win10-UnitTests/Win10-UnitTests_1.1.0.0._x86_Test
Run CertMgr.exe on this generated certificate. This step will fail if you are not running Command Prompt with administrator privileges.
>"C:\Program Files (x86)\Windows Kits\10\bin\x86\certmgr.exe" -add Win10-UnitTests_1.1.0.0_x86_Release.cer -s -r localmachine root
Run VSTest.Console.exe on the .appx file in this directory.
>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" Win10-UnitTests_1.1.0.0_x86_Release.appx /Platform:x86
You should see your unit tests listed out in the window if you've done everything right! Hope this helps!
If both Ivan Marinov's and Kylaa's answers didn't work for you (like unfortunately happened to me), try using the appxrecipe of the UWP test app as the target file, and not the appx itself.
For example:
vstest.console.exe testProject.build.appxrecipe /platform:x64
https://github.com/Microsoft/vstest/issues/1393
https://github.com/Microsoft/vstest/issues/1477
Followed by #Marinov, UWP does not support to test the App currently. Only Library can be testable.
remarks: https://github.com/PrismLibrary/Prism/issues/140#issuecomment-165572951
So, if you want to do unit test in UWP, you have to pull your logic codes out from App project and pour them into newly created library project. Test project and original app project could be referenced afterwards.

Debug a GTest in VS2010

I have a solution in VS2010 (C++ code) that includes test files directly in the src and include folders for the project of a plug-in. I am using Google Test framework. The plug-in, let's call it myPlugin, is running on a software, say mySoft.
######################################################################
Here is the issue:
I can run tests with command line, ok.
But i would like to debug inside the GTESTs. Why ? Because the tests are not really unit tests, they are setting a lot of parameters, and i would like to check step by step that everything is set ok. I know this is not mandatory to solve this and that i can debug the application itself. Anyway, this is my question, i want to debug inside a gtest.
I try to config VS2010 properties so as to launch the tests from VS, and this is not working.
############################################################################
More details:
To run the tests, i have to have an executable launched. In other words, i am running tests while an application, mySoft.exe, is running. The plug-in is running using another executable, the sdk_mySoft.exe.
The command lines (that work) are
mySoft.exe -sdkRun=pluginLevel ;pluginDirName;version;myPlugin_x64.dll
--gtest_output=xml
-sdkRun is in-house command offered by the sdk to set up GTests. So here i launch my application, run the plug-in, get some logs from google test, ok.
Then, I try to configure VS with these debugging properties:
Command $(SolutionDir)\bin64\mySoft.exe
Command Arguments -sdkRun=pluginLevel ;pluginDirName;version;myPlugin_x64.dll
--gtest_output=xml
and here this is not working.
Error is
Debugging information for 'mysoft.exe' cannot be found or does not
match. Cannot find or open the pdb files.
Any idea ?
How to debug in gtest, taking into account the special conditions here: have to launch an application?
Thanks
To debug the GTest, the debugger needs to be linked to application.
Launching the application, click on CTRL gives access to the VS debugger.

I created NUnit tests, now how do I run them?

I'm developing in vs2008, c#, .net 3.5.
I downloaded NUnit 2.5 win / msi version. I have created a [TestFixture] Class containing several [Test] methods.
How do I run the tests?
When I run a NUnit demo solution from Ed Ames, his test .cs files have an icon in the grey column to the left of the code (same place where breakpoints, bookmarks, etc show up.) Clicking on the icon gives me an option to run the tests.
That icon is not showing up in my projects. Is there a property I need to set?
Also, the documentation refers to a NUnit GUI that can be used to run the tests. A GUI doesnt seem to have downloaded in the msi version of NUnit. Is there a separate download for the Gui?
Thanks for all your help guys.
I am using resharper, forgot to mention it.
Actually, tests were not running (no tests found in file) because my [TestFixture] class was not Public. Changed it to Public and all my tests showed up.
Also, thanks for your help finding the Gui. I was looking for an exe with GUI in the filename. But I will use Resharper to run the tests. Now that I have found them!
The demo you saw most likely had a VS plug in (Resharper, TestDriven.NET, etc.), which doesn't come with NUnit. However, NUnit installs with a GUI. Go to the folder that you installed NUnit and you will find it there.
The program is called nunit.exe and it's in the bin folder.
Once you start it, you'll need to go to File -> Open Project and find the DLL you built in Visual Studio
You can use the nUnit runner (GUI - nunit.exe in the bin folder, Console - nunit-console-x86.exe) which comes with nUnit I believe.
Alternatively, if you have resharper (http://www.jetbrains.com/resharper/) installed, it has a test runner.
There is also TestDriven.Net (http://www.testdriven.net/)
I haven't seen this demo, but it sounds very much like he is using Resharper.
If you ran the msi installer, it will have installed the NUnit GUI runner. If you browse your start menu its likely under Programs -> Nunit. From the GUI runner you can load your test assembly by navigating to the bin directory of your project.
You have to open the dll with 1) Nunit command line or 2) Nunit GUI