Debugging Tests - Getting Testem/Qunit from closing test browser window - testing

Ok, I'm using Ember-App-Kit which uses Testem/Qunit, but I can't figure out how to debug tests, especially since either Testem or Qunit close the QUnit tests window so I can't set any breakpoints, and node debug with debugger doesn't work since it's in browser.
I tried to set the debug: true property in grunt-contrib-testem but that didn't do anything..
So if anyone can help, that would be awesome. I'm using the default EAK setup without any changes.

You'll need to do a few things:
Keep the grunt server task running in one window -- this will rebuild your test assets and compile them into the build/test directory.
Run Testem in standalone mode -- you'll first have to install testem via npm (npm install -g testem) then call testem from your app's root directory. Alternatively, you can run grunt test:server, which will let you run testem without installing globally.
Drop a debugger statement in your test body. In an open Chrome window running the Testem harness, open your Developer Tools console window.
Refresh the Chrome window, and you'll now have breakpoint capabilities in your tests.

Related

When i run a test in protractor instead of opening the given link in browser it gives error(please check image)

So when i execute a simple calculator program from VS- Studio and when the browser opens ...everytime it is same(plz refer image) tried lot but everytime same error. I followed lot of tutorial for protractor automation tool..no progress
You are running integration tests using karma
I am sure you are using ng test
Which will run integration test. I mean the spec file inside your component will be run using karma
Use ng e2e to run protractor tests.

Why aren't css and js files loading when SpecFlow-Selenium tests are run using vstest.console.exe from the command prompt?

I have some tests for a web application which were automated using SpecFlow and Selenium WebDriver. When I run the test from Visual Studio's Test Explorer, the test runs fine. I'm trying to set up a CI pipeline on Jenkins and in order to run the automated tests I'm relying on vstest.console.exe. However when I run the from the command prompt using vstest.console.exe, the application didn't appear as it should. When I checked the Console in Chrome's Developer Tools, there were a quite a lot of js and css files logged as Internal Server Error. Below is a screenshot of the console error for a few files.
Any help with this will be greatly appreciated...

Why ng e2e builds modules?

I used selenium webdriver before, in custom build project. It just opened web page of my project right away and immediately started running test cases. The only prerequisite was to start project server before launching it.
Now after creating generic project using 'ng new' I started it with 'ng serve'. Then I ran 'ng e2e' to test UI. It works, but for some reason it goes through whole module building thing again. It takes some time while I would like tests to start as fast as possible, and I know from my experience that it can be done.
The question: Can module building phase of ng e2e be omitted?
with the angular 6 and on --no-serve is not available anymore, so use instead:
ng e2e "--dev-server-target="
(yes empty value after the '=')
this will work if you have another window running an ng serve command.
Try with --no-serve option
ng e2e --no-serve

Eclipse by default run eclipse plugin headless

I have a eclipse plugin project which runs by opening eclipse UI. I have added an extension
org.eclipse.core.runtime.applications
to run that plugin headless for some testing purpose. Now if I run that plugin project from context menu run option. It always run project in headless mode until i do not choose UI launch configuration by opening run configuration window.
Any idea how we can set default launch configuration to run it via opening UI? so i do not need to select launch configuration every time through run configuration window. Same problem is there in case of debug.

How to Serve an Aurelia.io app without using Gulp watch

How do you run an Aurelia app without running gulp watch and just going to localhost:9000. Ideally I would like to just run my nodejs server and it all just works without having to run a separate task (a gulp task).
I would like to build Aurelia and just start using it in the same way that I can with Durandal.
take a look at the Aurelia-Node Repo for a quick start. It uses ExpressJS to provide a simple REST api as well as static serve the Aurelia App.
You'd still need the Gulp task (inside public/app) to build your es6 modules etc. but the hosting then works from node itself, so gulp build should be enough.
EDIT:
The repo provides a gulpfile in the root as well. The big difference using this one is that it not only transpiles the frontend code but also browserSyncs the node application via nodemon. Again all of this is not necessary for final hosting. A normal node app.js would be enough. Gulp etc. is just used during the development process.
I download Aurelia repository from
https://github.com/aurelia/
And run project successfully via webstrom on different port not on localhost:9000 without "gulp watch" .
But I installed Aurelia dependency then started project on webstorm its run successfully.
Steps for run project without "gulp watch"...
Run given command on command line from project folder.
Install the Apps dependencies - **npm install**
Install JSPM dependencies - **jspm install -y**
Install Gulp - **npm install gulp**
then explore your index.html page on chrome. Make sure you running Aurelia in Chrome, IE and Firefox.
I tested Aurelia application in Chrome, IE , Safari and Firefox result
Chrome - Pass
IE - Pass
Firefox - Pass
Safari - Fail
But in safari that was fail.