I'm running a set of tests with mocha and i need the tests to run in the browser, therefore ; i'm doing this :
mocha.setup('bdd')
the tests do run fine in the browser, but i need this to be executed in jenkins. I must run the tests in the browser and i'm trying to get the reporter to output xunit reports .
i've tried the xunit-file package and another one called "mocha-multi" , it looks like browser tests only support the html reporter. Is there a way to output both the xunit and browser reports? or at least to execute the tests in the browser and report xunit results?
so there is no way to have two reporters if you're running the tests in the browsers and not in node js. After digging into mocha,i realized that there is a tests results variable as part of the mocha objects that you can instantiate in the browser. You need to use this to actually access the resutls and write the report yourself.
Related
I'm using cypress-allure-plugin in order to generate allure reports for cypress tests.
When I try to run all the specs in headed mode automatically I don't get a full report as every other test except the last has a "skipped" status in the report despite that not being the case when I watch the tests being executed.
This issue seems to be exclusive to using the "Run x integrations specs" since running them one by one manually in headed mode doesn't produce this issue and neither does running them in headless mode.
Has anybody encountered a similar issue?
EDIT: I think I found the issue. Sometimes the tests reload wipping current test results and only results that were generated afterwards are used in the report.
I'm trying to run a set of cucumber selenium tests as part of a build in TFS2015, but it doesn't appear to be running them at all. I only get a timeout error. What I can conclude is that it is having difficulty starting up the browsers. I suspect that it is not running them properly from the script. Any idea how to fix?
We include Selenium tests in our feature test build by wrapping each Selenium test with MSTest and/or CodedUI attributes which works perfectly. You do have to make sure the build/test agent is configured to run in Interactive mode otherwise the test run won't have access to the desktop to automate the browser.
http://donovanbrown.com/post/2015/08/28/auto-start-build-agent-in-interactive-mode
We don't use Cucumber however so that may be the issue for you, not sure.
I have some scala.js unit tests written in utest. They all run just fine from the sbt build, however I would like to be able to step through the unit tests in a debugger. Using my favorite IDE (intellij) to debug the tests won't work because it will try to run them on the JVM. Is there some way to step through the unit test execution similar to how you can step through the (javascript) application code in browsers like chrome?
Currently, the only way to (step-by-step) debug Scala.js code I know of, is inside a browser. You can generate an HTML runner for your tests in sbt:
sbt> testHtmlFastOpt
// snip
[info] Wrote HTML test runner. Point your browser to .../test-suite-fastopt-test.html
This works starting Scala.js 0.6.10.
Can Chutzpah run qunit tests from a url? I need a lot of server-side injected markup and json data in my qunit tests, so I like to run the test suite within my visual studio project on localhost instead of mocking tons of test data in my test.js files.
As of version 2.4 Chutzpah now supports running against a remote url. See the documentation here.
Maybe it helps to share our testing strategy.
We use chutzpah for javascript unit tests. No dependency on a running server. The tests run very quickly as part of the build. (But we are not testing generated javascript code which is your scenario).
We test against running server by writing tests in JavaScript and running them with PhantonJS. See my answer for an example of one of our tests: automated functional web GUI testing frameworks (asp.net)
If you don't like writing the tests in Javascript like this (it is not as nice as using a unit testing framework - like qUnit or jasmine) you could checked out CasperJS.
I am using the Gallio MSBuildTasks library to run MbUnit tests inside JetBrains TeamCity. When tests pass they report as having passed once, however when they fail they appear as having failed twice. Once with the Namespace and once without. This looks something like:
http://imageshack.us/photo/my-images/191/capturegv.png/
There are two tests here (Test and Test2) and they both fail. However TeamCity reckons they have each failed twice, displaying each one with a namespace (UnitTests) and then without. This is not just the report in the TeamCity website interface, I have pre-test commit enabled and they show up as failing twice in there too.
Has anyone else experienced this and if so how have you solved it?