I have a lot of coded ui test. I have updated tfs2012. It gives an error when I build it. It was working correct before updating. Where is the problem,thanks. (Test cases were working on test agent machine)
Failed to initialize the unit test extension 'urn:CodedUITest': A unit test extension is not registered for the following attribute: Microsoft.VisualStudio.TestTools.UITesting.CodedUITestAttribute.
Related
In my Cypress tests, I create some data in before block and then my test script is run that locates in it block. I checked business side flow and it seems like there is no error about app side. I just want to understand that why my test's result is success after second attempt. Does Cypress has this kind of solution to handle an error maybe?
Cypress has the ability to automatically retry any failed tests. I would check your Cypress configuration's value for retries.openMode.
I am using this module -https://bl.ocks.org/denji/204690bf21ef65ac7778 to create html report for my nightwatch test. Test report creates successfully if there is no run-time error during the test run. for an example it creates html report successfully even if one of the assertion fail, as long as there is no run-time error.
however if there is any error thrown like below then , it does not create html report including all the test suites it ran.(please check the screen-shot i've attached as well). How can i capture all the failures in the html-report and create the report successfully.
POST /wd/hub/session/fd34aff5c708035939c98efd74afd866/elements - ECONNRESET
Error: socket hang up
at connResetException (internal/errors.js:570:14)
at Socket.socketCloseListener (_http_client.js:380:25)
Error while running .locateMultipleElements() protocol action: An unknown error has occurred.```
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/ZgOat.png
The problem is not about html-report. Its about junit xml report. The junit xml report is not generated when the element is not found. https://github.com/nightwatchjs/nightwatch/issues/1977.
I was using the version nightwatch 1.3.2. Better solution is to update to the latest version 1.3.4
I have a react application that uses Jest and jest-teamcity-reporter as a testResultsProcessor
my npm test scripts is as follow :
the problem is when i run my build in team city which contains test coverage, the test is running but i cannot see the test tab in the result and also the number of test passed.
in the logs i have the following errors :
Please note that i have other projects with the same template and i don't have a problem seeing the test tab and the metrics
finally here is my build steps defined in the template
Could you please help me with this problem.
Thank you.
You have to add the test result processor in your jest configuration object inside your package.json.
"testResultsProcessor": "jest-teamcity-reporter"
To test locally, you need to set a variable in command line : SET TEAMCITY_VERSION=1
You will see logs lines starting with ##teamcity and that's the metrics you're looking for.
I have a test suite of around 1000 test cases, but sometimes if one test case fails due to some unclosed popup window, all of the subsequent test cases will also fail because the popup modal will not allow protractor to interact with page elements.(My app is that way)
So I want to create some condition such as i will refresh the page if a test case fails or I will go to my homepage link if test case fails as all tc's start from same starting point.
This will prevent all my subsequent test cases from failing. This method was called recovery scenario in QTP/UFT days.
I was also facing these kind of issue that if one test case fails subsequent all test cases will fail,Not sure if there is any recovery scenarios available in protractor but I am using before all, after all, before each and after each to start my each test from a clean state. I have added a helper function to navigate to Home page and I call every time this function from before each.
this is helpful link
I have a suite of Selenium tests that I created in the Selenium IDE and ported over to Java. In several tests I use the Java equivalent of the verifyTextPresent command to confirm some text on the page (verifyTrue(selenium.isTextPresent())).
I found an spelling error in the text on the page when running the test from the IDE, but the error was not caught when running the test via Selenium RC/TestNG. Here's an example of the code that I have and the text that is causing the problem (spelling error in bold):
Text:
Please correct the errors indicated below.
You need to add a least one restriction.
IDE:
verifyTextPresent | Please correct the errors indicated below.
verifyTextPresent | You need to add at least one restriction.
Java:
verifyTrue(selenium.isTextPresent("Please correct the errors indicated below."));
verifyTrue(selenium.isTextPresent("You need to add at least one restriction."));
Since both versions of the test have the correct text, why is the Selenium RC version not catching the error? Has anyone else had this problem?
The reason why this happens is that the test continues to run after the call to verifyTrue(). Verifications in Selenium catch the exceptions that would be thrown by a failed verification, as opposed to an assertion which throws an exception and causes the test to fail. Because verifications catch exceptions instead of throwing them, the test passes.
At the end of the test, the method checkForVerificationErrors() needs to be called to see if any of the verifications failed. If the method is not called, any verification errors will be ignored and the test will still pass (absent any other problems).
A discussion on the Selenium Google Group about the error itself is here. A discussion about the various verifications vs. assertions is here.
I had a similar problem... My workaround is to use assertTrue() instead of verifyTrue(). I hope it works for you to.