Running Ember Tests in the terminal: Console log not working - ember.js

I am working on an ember 2.8 project and I am a newbie. On top of this, we are using a docker container to run in pc because we don't have a mac. So I running the qunit tests and am unable to go to /tests to see the tests in the browser. Because of Docker they break.
I must run 'ember test' in the terminal and view the output.
However I am finding it quite difficult to debug, the console.logs and qUnit.logs do not output to the terminal and I can't get the ms code debugger to work.
Does anyone have any suggestions?
Thank you

Related

Karma debug showing empty screen

When running tests for angular2 using Karma, when I click the debug button I'm not getting the on screen info that Im expecting, letting me know if the tests have passed etc.
They are passing ok in the console window.
I'm new to all this so would greatly appreciate some help!
Thanks
I do not exactly know your setup and what you expect to see. But I had a similar problem with the angular starter project from https://github.com/AngularClass/angular2-webpack-starter.
The solution for me was to add "karma-jasmine-html-reporter": "^0.2.2" as dev dependency in package.json and 'kjhtml' as reporter in config/karma.conf.js. After running npm install and npm run watch:test Chrome starts and the tests are executed but the Chrome window keeps open. When I click on "Debug", it shows the tests (an empty list for the starter project). I hope this helps.

Selenium PhantomJS is it the same as running IE

I need to run my Selenium Python test script for IE.
If i ran it using a headless browser PhantomJS, is it going to be different than running it for IE?
I am asking because I am having a problem running my Selenium Python test script from a batch file from task scheduler.
I can run my batch file on it's own and that runs ok. But when i run it from Task Scheduler the browser does not open so the test fails.
The dev says Task Scheduler runs in the background with a headless browser.
If i used PhantomJS it won't be the same as IE?
I need to test it using IE but the batch file which runs my Selenium test won't open the browser from task scheduler.
My batch file is as follows:
set TEST_HOME=%~dp0
cd %~dp0
SET PATH=%PATH%;G:\test_runners\selenium_regression_test_5_1_1\IEDriverServer\64bit
cd %~dp0selenium_regression_test_5_1_1
set PYTHONPATH=%~dp0selenium_regression_test_5_1_1
c:\Python27\Scripts\nosetests.exe "%~dp0selenium_regression_test_5_1_1\Regression_TestCase\split_into_parts\RegressionProject_TestCase_Part1.py" --with-html --html-file="%~dp0selenium_regression_test_5_1_1\TestReport\SeleniumTestReport_part1.html"
I appreciate some help on this.
Thanks, Riaz
That's the same as asking, is the ouput the same in IE and in Firefox? Not exactly, visually it will look the same but in the source code some elements are adapted to the browser you're using.
Phantomjs is a browser on it's own, so, some elements can be hidden or not even loaded but it's rare. A good example of this is Twitter. I noticed during some tests that the click on the twit box to write some text behaves differently in phantomjs than in other browsers!
The reason why task scheduler doesn't let you use IE is because you can't use any graphical environments during the lifetime of the proccess.

Jenkins not failing on tests that fail in coverage

I have Jenkins setup to run tests before anything gets pushed into our QA environment. Recently I added python coverage to check code coverage of the tests.
Issue I have is not I see in the output that tests are failing, but the build still pushes through.
I am running the following in a bash script:
coverage run manage.py test --settings=my.settings.jenkins --noinput
When I was running the tests normally without coverage, if the test failed, the build would fail, this is no longer the case.
The project is a Django project on Python 3, any help would greatly be appreciated.
I am hitting the same issue. My Jenkins build always passes even if Coverage.py has some failing tests (I use the same command as you).
I have come up with a workaround but would ideally like to know if you figured it out?
My workaround uses the TextFinder plugin and I search the console for a specific string which I then fail the build if found....Hack-y I know!
https://wiki.jenkins-ci.org/display/JENKINS/Text-finder+Plugin

How to run Windows phone 8 & 8.1 Unit tests in jenkins [Visual studio 2013]

We use Jenkins as our CI, and im looking to have Jenkins run visual studio tests. Ive figured out how to have Jenkins use vstest.console.exe for desktop applications, but im not sure how to get that to work for windows phone 8.1 tests. I'm running vstest.console.exe against my unit test project's appx file, but im getting:
Error: App package ...appx does not has test executor entry point. For
running unit tests for Windows Store apps, create app package using
Windows Store app Unit Test Library project.
Any help getting the program to work thorugh command line would be of big help, but if there is a short cut to run it through jenkins that would be even better.
I found an answer to my problem. Make sure to use /InIsolation, and use /Settings:{settingsFile}. For some reason vstest.console.exe cant run the unit tests for windows phone without specifically setting a settingsfile. In jenkins/vsTestrunner there is an option to set the settings file. You will likley still get an error regarding running the test in non-interactive way on jenkins, but there are a few stackoverflow posts about this already.

ember-cli-blanket not working

I have installed the plugin for 'ember-cli-blanket', using command:
ember install:addon ember-cli-blanket0
But when I run the tests using "http://localhost:4200/tests", nothing is loading I am getting just a blank page, no error in console also.
When I referred in some online tutorials, they asked to pass "data-cover" with the <script></script> tag. But no progress.
If i uninstall the plugin and run the tests it is working fine.
Can anyone tell what am I doing wrong or any more settings needs to be done?