TFS release managment test result view fails with JSON error - integration-testing

I have a TFS (on premises version 15.105.25910.0) server with build and release management definitions. One of the definitions deploys a web site, the test assemblies and then runs my MSTest based Selenium tests. Most pass, some are not run, and a few fail.
When I attempt to view the test results in the TFS web portal the view of "failed" test results fails and it shows the following error message:
can't run your query: bad json escape sequence: \p. path
'build.branchname', line 1, position 182.
Can anyone explain how this fault arises? or more to the point what steps I might take to either diagnose this further or correct the fault
The troublesome environment and its "Run Functional Tests" task are shown below
Attempted diagnostics
As suggested by Patrick-MSFT I added the requisite three steps to a build (the one that makes the selenium tests)
Windows machine file copy (Copy MStest assembly containing selenium test to c:\tests on a test machine)
Visualstudio test agent deploy (to same machine)
Run functional tests (the assembly shipped in 1)
The test run (and have the same mix of pass fail, skipped) but the test results can be browsed just fine with the web pages test links.
Results after hammering the same test into a different environment to see how that behaves...
Well, same 3 steps (targeting the same test machine) in a different environment works as expected - same mix of results, but view shows results without errors.
To be clear this is a different (pre-existing) environment in the same release definition, targeting the same test PC. It would seem the issue is somehow tied to that specific environment. So how do I fix that then?
So next step, clone the failing environment and see what happens. Back later with the results.

Try to run the test with same settings in build definition instead of release. This could narrow down if the issue is related to your tests or task configuration.
Double check you have use the right settings of related tasks. You could refer related tutorial for Selenium test in MSDN: Get started with Selenium testing in a continuous integration pipeline
Try to run the same release in another environment.
Also go through your log files to see if there are some related info for troubleshooting.

Related

In Robot framework test case scripts works fine but getting while triggering in Azure pipeline

We are having some difficulties implementing the Azure DevOps pipeline as a team. We are conducting the testing on our agent-hosted Windows os in the background. A couple of our test scripts were successful, while others were unsuccessful for unknown reasons.
However, the identical test scripts are all run with a pass in locally 100% in versus code result. Unable to determine why the agent-hosted Windows operating system is failing
Ideally, all suggestions would be constructive.
All test scripts which execute need to pass in azure pipeline any suggestion would be helpful

how to run my all test cases on every developer build automatically?

I just want to know something about Katalon Studio. I have not worked in automation testing before but now I have some assignment about testing in Katalon.
My client wants to test in Katalon but his requirement is that he wants to run test cases on every build automatically and he also doesn't want to install Katalon IDE or any library he just want reference so that he just added that reference on every build so that all the test cases run automatically on every Dev build.
Is this possible using Katalon? Kindly help me, please. Thanks.
You have to establish full CI Pipeline for your requirements. My advice is, to use Katalon with Jenkins and your developers code repository (perhaps GIT or SVN). Than you are able to implement a server/slave pipeline, where you can execute your Katalon scripts on slave, every time DEV builds.
See:
Katalon/Jenkins Tutorial

Coded UI Automated Test Case through Octopus Tentacle

I am trying to run my Automated test cases deployed on a virtual machine and trying to trigger it with the help of Octopus Deployment tool. I installed test agent and Octopus Tentacle on my machine. Octopus is triggering the DLL's for Automated test cases very well.But while Octopus trying to run the test cases it's giving me an Error as below:-
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set up the test agent to run as an interactive process. For more information, see "How to: Set Up Your Test Agent to Run Tests That Interact with the Desktop" (http://go.microsoft.com/fwlink/?LinkId=255012)
Error 01:59:38
If you are running the tests as part of your team build, you must also set up the build agent to run as an interactive process. For more information, see "How to: Configure and Run Scheduled Tests After Building Your Application" (http://go.microsoft.com/fwlink/?LinkId=254735)
I setup my password in test agent and set it as intractive process but still i am facing the same issue.
I am triggering my DLL's as below through Octopus.
& "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "C:\MyWebaPP\Automated_test\Automated_test.dll"
I tried each and every way i found.Please help me out in this.
Thanks in advance!!
We recently encountered the same problem.
During our research, we found this post on the Octopus support forum:
http://help.octopusdeploy.com/discussions/questions/5080-tentacle-running-interactive-tests
We also contacted Octopus Deploy by mail, and they essentially gave us the same response.
While we had no luck with the "scheduled task for test run" approach, we eventually managed to get it working by running the Octopus Tentacle as a process rather than a service.
The challenge here was making sure the Tentacle would start when our test machine started. We wanted this to happen automatically, so RDPing in and starting the process every time was out of the question (this also caused some additional problems for the UI test run...).
The final working solution was to schedule a task that would start the Octopus Tentacle as an interactive process whenever the machine booted (i.e. run Tentacle.exe directly), and then make sure we never RDP to this machine. Make sure the task has sufficient privileges, and that it "Runs whether the user is logged in or not". Also, remember to disable automatic startup of the Octopus Tentacle Service.
Edit: We had some trouble making this solution work across all our environments. It seems that for security reasons, newer versions of Windows are quite skeptical about allowing scheduled tasks to start interactive processes when there is no user logged on.
We did another search for possible solutions, and came across FireDaemon Pro (commercial software), which allows us to register interactive Windows services that run under a domain user. Not quite sure how it works, but they seem to be able to run a UI from a Windows service in session0 (the UI is also isolated). The Octopus Tentacle starts without complain, and the UI tests run the way we want them to.

After importing failed test results build status is succeed in TeamBuild

Using VSTS (formerly know as VSO), I'm importing test results from a 3rd party testing tool.
This is working fine, however when the imported results have a failure in them, i would expect the build to fail, however it doesn't. As seen below.
Any advice? this seems like a bug.
The vNext build pass/fail base on the execution status of each steps in the build definition. It does not check the published test result. You can submit a feature request on VSTS User Voice.

Monodevelop+WebApp+Selenium+NUnit: How to approach?

I am starting an ASP.Net application in MonoDevelop (blank slate, hobby). I recently used Selenium on a Java based project for a client so thought I would start implementing some testing right from the get go in this project.
I have a solution with two projects: "Website", and "Website Tests". Unfortunately, I can only run one project at a time. The Website Tests always fail because the website is not running.
Is there a way around this, or am I going in the wrong direction?
Updated Details:
Confirmed WebsiteTests is set as a "Library"
Project Options -> General -> Build -> Compile Target == Library
Exact steps taken
Select: "Website" Project
Select: Run with Debugging
Verify site is running
Select: View -> Pads -> Unit Tests
Select: Login -> TestTest (just a blank test, no contents)
RESULT: pop-up "An application is already running and will have to be stopped. Do you wish to continue?"
EXPECTED: ability to run tests
Running in separate MonoDevelop instances also has the same problem. This is unfortunate as it makes it impossible to step through your tests and site (have to choose one).
Selenium+Mono is a non-viable solution.
https://code.google.com/p/selenium/issues/detail?id=5258
Also, MonoDevelop (on Ubuntu) does not appear to have the ability to run multiple processes. This appears to extend to multiple instances of MonoDevelop.
As a work around, you can run the NUnit-Gui separately. Keep the NUnit GUI open as you develop the tests. This is a little old-school, but it works.
Open Test Project
Make changes to project
Compile
Switch to NUnit GUI window
Run Tests
This still doesn't work as the current Mono+Selenium stack can only run one test at a time. The test project needs to be shutdown and restarted between test runs.

Resources