Development on Va...
Follow
Find tag "Karma"
9.1K views | +0 today
Development on Various Platforms
Your new post is loading...
Your new post is loading...
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

BrowserStig = Developer Friendly Browser Automation

BrowserStig = Developer Friendly Browser Automation | Development on Various Platforms | Scoop.it

Although BrowserStig may be used for other automation purposes, it's main purpose is to be used for functional testing. As mentioned before, you can use browserstig.js standalone without the cli. This would allow you to import browserstig.js into any javascript testing framework. However, the stig cli is designed to help you start testing immediately with minimal setup.

If you have used the karma test runner, you will be familiar with the stig cli. Really, the stig cli just wraps the karma test runner. The supported test styles are 'mocha', 'jasmine' and 'qunit'. However, this documentation only covers testing with mocha.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Advanced Testing and Debugging in AngularJS

Advanced Testing and Debugging in AngularJS | Development on Various Platforms | Scoop.it
Learn to test, debug and prepare the test code on your AngularJS application like a Pro using Jasmine unit testing and Protractor integration testing

AngularJS is becoming immensely popular and mainstream which means that there is a lot of AngularJS code out there that is being tested or is yet to be tested. And now that you're well on your way to test like a pro, thanks to the abundance of articles, tutorials, books and material out there on AngularJS testing & development, testing should be a mandatory process of your web development workflow.

Full-Spectrum testing with AngularJS & Karma taught us how to test certain areas of your AngularJS application, but how do we test efficiently? How do we debug a problem down the root cause? How do we skip tests, set breakpoints, and professionally mock-out our test components so that we can catch hidden bugs and unexpected scenarios? How far can and should we go with Unit & E2E testing? What else should we consider. Well lets take adeeper dive into testing in AngularJS and expand our minds by learning how to become a professional front-end tester.

Table of Contents:
* Presentation Slides + Video
* What to test and what not to test
* Preparing your test environment with Karma & Grunt
* Write tests as you go
* So when do you do your testing?
* Module & Inject Breakdown
* Powerful Mocking Strategies
* Sync' and Async' testing
* Skipping and Filtering tests
* Echoing data back to screen
* Using Breakpoints
* Writing Efficient Tests
* Testing older browsers
* Invest into preparing a CI environment
* Feedback Please!


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Setting-up AngularJS, Angular Seed, Node.js and Karma

Setting-up AngularJS, Angular Seed, Node.js and Karma | Development on Various Platforms | Scoop.it

I’ve used AngularJS for a few months, but I have no knowledge when it comes to testing AngularJS apps. I have a subscription to PluralSight.com and wanted to go through their online video training course for AngularJS. Specifically with this course I want to learn how to use Karma to do testing.

I’m usually extremely happy with PluralSight.com course, but in the beginning of this course I was somewhat disappointed. In Section 7 (“Angular Seed”) new technologies were introduced. The author introduced Angular-Seed, Node.js and Karma. I’ve worked with Node.js, but there are probably many people who have never used it. I believe the author took for granted that the student knew Node.js. For those who have never used Node.js this could be an obstacle.

Here are the high level step we will follow:

Download and install Angular-SeedDownload and install JetBrains WebStorm (Optional)Download and install Node.jsConfirm Node.js is installedRun Karma Unit Tests – will fail because Karma is not installedInstall KarmaRun Karma Unit Tests again – Will fail because Chrome will not startAdd System Variable to WindowsConfirm System Variable Were AddedRun Unit Tests again – should succeedConfirm that Units are being tracked by KarmaStart Web Server by using Node.js
Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

An AngularJS Test Pyramid

An AngularJS Test Pyramid | Development on Various Platforms | Scoop.it

As a team with a strong taste for automated testing we focused from the beginning on how to test our Angular app. In this post we want to describe our different types of tests and how they form a Test Pyramid.

Level 4: Selenium Tests.
Level 3: E2E (Scenario) Tests.
Level 2: Directive Tests.
Level 1: Unit Tests.

For each kind of test, we will explain the following aspects:

* Purpose: What’s the idea behind this type of tests. When to use and what is being tested (the scope of the test). Principles how to write the test.
* Implementation: How does it look like in source code. Examples, technical issues.
* Our experience: Reflection about our specific experience. Some heuristic data.


Via Jan Hesse
more...
Ehab Roufail's curator insight, October 7, 2013 12:29 PM

Very similar approach to what we are adopting and have adopted recently.

Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

How To Unit Test An Angular App.

How To Unit Test An Angular App. | Development on Various Platforms | Scoop.it

AngularJS has a great testing story - it’s all based on Dependency Injection, the Karma test runner was written by one of its core developers Vojta Jina and it ships with a variety of mocks like the $httpBackend for unit testing requests to remote services.

What I haven’t been able to find much of are examples showing how to take advantage of these features when testing an application that does more than just expose objects connected via a rest api.

Today we’re going to build a simple Tic-Tac-Toe game writing unit tests along the way.


Via Jan Hesse
more...
No comment yet.