How do I enable execution process logs in VS 2013/MSTest - mstest

This is the error message I'm seeing:
The active Test Run was aborted because the execution process exited unexpectedly. Check the execution process logs for more information. If the logs are not enabled, then enable the logs and try again.

You can activate mstest logs via mstest.exe.config file, see How to enable MSTest logs.
I'm not sure what "execution process" means exactly in this case, but mstest logging could be really helpful.

Related

Detect network error and retry running task in Azure

Running bash script in Azure pipeline. I am trying to rerun the npm publish step x-times if there is any network error is detected.
Is there any way to detect a network error specifically and rerun the whole task again?
I've found this document (https://learn.microsoft.com/en-us/azure/devops/release-notes/2021/sprint-195-update#automatic-retries-for-a-task) but I believe this reruns the process regardless of the error type.

Cannot debug with Visual studio 2019 -HTTP Error 500.0 - ANCM In-Process Handler Load Failure

I am trying to debug my own application, but when I launch it with the VS2019, he shows me this message:
HTTP Error 500.0 - ANCM In-Process Handler Load Failure.
At the beginning I had found on the internet that it is necessary to modify in the web.config the hostingModel from "InProcess" to "OutProcess" but I could no longer launch the application.
After that, I tried to run the application with dotnet run with command line,the ANCM In-Process Handler Load Failure is gone and in the same time i runned the application from VS2019,the error is gone also.
My application work now in Localhost with two Different Ports.
My problem now is When i made some change in my code i have to repeat this procedure to access debug :
shutdown application from command line (if its already up)
rebuild app with command line or IDE
execute dotnet run with command line
launch it with debugger of IDE
if anyone encountered such a problem, how did they solve it
By any chance, did your project name end with the characters "dotnet", like "myappdotnet.csproj"? I discovered that when trying to run any project that ends in those characters, IIS Express throws this exact error.
Unfortunately, I have no idea where this would be documented--if it is.

How do I start a Liberty server in debug mode in the background with the liberty-maven-plugin?

Use Case
The liberty-maven-plugin has a debug goal which allows you to start the server in debug mode, but in the foreground.
Often when wanting to attach the debugger, this is all you'd need. You can execute tests separately somehow or via other goals launched from another shell.
But the debug goal, like the run goal, runs in the foreground and blocks until the server process completes.
If I want to continue to the next phase of my build, e.g. on to run integration tests, it could help to configure a start goal to start the server in debug mode, in the background, and continue on.
Use: src/test/resources/jvm.options
In src/test/resources/jvm.options, for example:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=7777
This is the default value for the <jvmOptionsFile> configuration parameter (described here), so of course you could configure a different location if desired.
Note:
Though an alternative might appear to be to use the <jvmOptions> configuration, it does not work well with the commas (',') embedded in this value.
Warning:
You may be expecting a message from the starting JVM:
Listening for transport dt_socket at address: 7777
However you will not see this from your Maven execution log, it actually appears in the console.log file of the configured server. So the Maven execution will just pause at the point of logging message:
[INFO] Starting server defaultServer.
If you fail to connect in time you'll see:
[INFO] Server defaultServer start failed. Check server logs for details.

How to stop execution of selenium scripts that is continued to execute event after the jenkins job is aborted

Issue:
I've started a selenium scripts execution job from the jenkins when few of the selenium scripts are executed i've aborted the job from the jenkins manually. But, the selenium scripts are continued to be running even after i aborted the job
can any one help with the solution to stop the selenium scripts execution
if the job is aborted
Can any one suggest me the windows command to stop the selenium scripts execution that are running continuosly
You can go to "Manage Jenkins" > "Script Console" to run a script on your server to interrupt the hanging thread.
Get all the live threads by running :
Thread.getAllStackTraces();
You can interupt the thread which is hanged, by running :
Thread.getAllStackTraces().keySet().each()
{
t -> if (t.getName()=="THREAD NAME" )
{ t.interrupt(); }
}
If your jenkins build isn't aborting,
Check the thread dump http://yourserver/jenkins/threadDump and look for the executor thread in question — they are named after the slave and executor number. That'll normally tell you where the thread is, and often reveals why it's not responding to an interruption.

Failed to successfully launch or connect to a child MSBuild.exe process

In VS2012, when building I frequently will get the following error:
Error 5 The build stopped unexpectedly because of an internal failure.
Microsoft.Build.Exceptions.BuildAbortedException: Build was canceled. Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" launches successfully, and that it is loading the same microsoft.build.dll that the launching process loaded. If the location seems incorrect, try specifying the correct location in the BuildParameters object, or with the MSBUILD_EXE_PATH environment variable.
at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration)
at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker)
In the task manager I see that there are at least 10-20 MSBuild.exe and Conhost.exe. I am unable to terminate these and even closing VS does not solve the issue. The only workaround at the moment is to log out and re-login.
Has anyone experienced this too, and perhaps have a resolution?
Thanks in advance.
Rob
See Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe which says to restart Visual Studio to fix the problem.
That certainly worked for me.

Resources