How to organize AngularJS unit tests from multiple projects? - angularjs

We have a VS2015 web solution with multiple projects where we use AngularJS. We decided to start writing unit tests for AngularJS code and picked up Jasmine framework. It means .js files with modules are not in one project only and I'm wondering how to centralize the testing.
What to do with .js files from different projects in order to be available for centralized unit testing?

Related

Where should unit tests live in an angularJS application?

I'm trying to stick to the pure angular recommendations for unit testing:
https://docs.angularjs.org/guide/unit-testing
But it really doesn't tell me where they should live. My guess would be inside an angular service, probably segregated by page or in the same file as the base controller, sort of a base testing factory or service.
If you use the CLI to create your app and new objects, it will automatically create all of the tests as separate files with the .spec.ts extension.
So if the CLI does it that way, that is probably the recommended way.

d3 Automation Testing

I need to test some d3 based Angular components and had thought to use Selenium IDE or Kantu, but it seems that these tools cannot record interactions with SVG elements. Are there any tools that would allow me test in this way? Or will I need to rethink the problem and use a different type of testing?
There is a tool specifically made for UI testing of angular.js pages. It's called protractor . In this, test scripts have to be written in Javascript. Protractor is for end-to-end testing.
If you are going to do unit testing , then the gold standard for unit testing angular code is Karma. Karma was created and is maintained by the core Angular team and provides many utilities that make it easy to test angular apps.
A combination of both protractor and karma can completely cover an angular app functionality.

what are options for automated unit testing in angular js

I'm new for unit testing so i want to know best automated option for angular js app testing.
I found some framework call Jasmine and Karma but I want to know best option.

unit testing of AngularJS code deployed under JBoss 7.1EAP

We all know that one of the best combination for Unit testing for AngularJS code is NodeJS, Jasmine and Karma js framework .
However challenge with our project is that client doesn’t want to use two containers i.e. NodeJS for testing and Jboss for deployment. Reason is the way Angular JS components are packaged for nodeJS is very different from Jboss. Also another angle to this problem is that angular components should be tested in a continuous integration environment. If you have two containers it makes whole CI/CD cycle complex.
Hence we are trying to find out a way on to how to execute these unit test cases with only Jasmine with JBoss 7.1EAP. And without using Nodes and Karma.
Please let us know if someone has faced this issue and let us know the steps for the resolution.
Regards
Debashish

Scala Play with Angular and Protractor project setup

I'm going to setup a new project with Scala Play on the one and angular/protractor on the other side. I could use sbt-web to load my js assets, but what is with testing?
Is there a best practice to integrate Angular into the Play framework without losing benefits like automated testing by using yeoman? Or is it better to make two projects and use gulp proxy in development?

Resources