XAMPP is a free and open source cross-platform web server package that consists of Apache HTTP Server, MySQL database, and interpreters for PHP and Perl scripts. It allows users to set up a local development environment for web development. XAMPP stands for Cross-platform (X), Apache HTTP Server, MySQL, PHP, and Perl. It provides a simple way for users, especially beginners, to start developing and testing websites locally without needing to install separate programs.
This document discusses troubleshooting Oracle WebLogic performance issues. It outlines various tools that can be used for troubleshooting including operating system tools like sar and vmstat, Java tools like jps and jstat, and WebLogic-specific tools like the WebLogic Diagnostics Framework. It also covers taking thread dumps, configuring WebLogic logging and debugging options, and using the Oracle Diagnostic Logging framework.
Ansible can be used to summarize documents in 3 sentences or less:
1) The document provides tips and tricks for using Ansible for tasks like automation, orchestration, and distributed batch execution across multiple hosts.
2) It also demonstrates how Ansible can be used for auditing changes to files and system configuration over time through plugins, callbacks, and other extensions.
3) Additionally, the document shows how Ansible can be customized and expanded through techniques like abstracting packages and configurations, creating custom modules, and executing tasks in a more programmatic way.
This document contains notes on JavaScript functions from a course. It discusses:
1) Functions allow breaking programs into modules for easier maintenance and debugging. Functions in JavaScript include predefined and programmer-defined methods.
2) Functions receive arguments, can call other functions in a hierarchical relationship, and may return values. Functions define local variables that do not exist outside the function.
3) Examples show defining and calling functions to square numbers, find the maximum of three values, and generate random numbers by scaling and shifting the output of Math.random().
This document discusses disk scheduling algorithms. It covers factors that affect algorithm selection such as request types and file allocation methods. It also summarizes common algorithms like FCFS, SSTF, SCAN, C-SCAN, and C-LOOK and how they work. SSTF and LOOK are generally good default choices but SCAN and C-SCAN perform better under heavy disk loads. The document aims to help understand how to choose the best disk scheduling algorithm.
The document provides information about the Apache web server including:
- Apache is an open-source web server software widely used on Unix-like operating systems. It creates a new thread for each connection and supports modules to extend functionality.
- It uses multi-processing modules like Prefork, Worker, and Event to handle requests via multiple child processes and threads.
- Directories like conf, htdocs, and logs contain configuration files, server content, and logs respectively.
- Configuration is done by directives in text files like httpd.conf covering aspects like timeouts, modules, and virtual hosts.
These are slides from our Big Data Warehouse Meetup in April. We talked about NoSQL databases: What they are, how they’re used and where they fit in existing enterprise data ecosystems.
Mike O’Brian from 10gen, introduced the syntax and usage patterns for a new aggregation system in MongoDB and give some demonstrations of aggregation using the new system. The new MongoDB aggregation framework makes it simple to do tasks such as counting, averaging, and finding minima or maxima while grouping by keys in a collection, complementing MongoDB’s built-in map/reduce capabilities.
For more information, visit our website at http://casertaconcepts.com/ or email us at [email protected].
Inside MongoDB: the Internals of an Open-Source DatabaseMike Dirolf
The document discusses MongoDB, including how it stores and indexes data, handles queries and replication, and supports sharding and geospatial indexing. Key points covered include how MongoDB stores data in BSON format across data files that grow in size, uses memory-mapped files for data access, supports indexing with B-trees, and replicates operations through an oplog.
Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability.
PHP is a loosely typed scripting language commonly used for web development. It was created by Rasmus Lerdorf in 1995 and has evolved through several versions. PHP code is interpreted at runtime and allows for features like conditionals, loops, functions, classes, and objects to build dynamic web applications.
Slides for meetup @Talentica Software on 25th January 2020
Topics Covered:
1. Dependency Injection
2. Ng-schematics
3. How to structure your apps
4. Deployment
This document summarizes a presentation about hacking Ansible to make it more customizable. It discusses how Ansible's plugin system allows it to be extended through modules, filters, lookups, callbacks and caches. Examples are provided of extending Ansible's core functionality by modifying files in the lib directory and writing custom plugins. The presentation also outlines how Ansible's object model works and provides an overview of its growth in modules and plugins over time.
WebLogic FAQs provide answers to common questions about Oracle WebLogic Server. The document includes questions about what WebLogic Server is, its basic components like domains and managed servers, how administration servers and managed servers interact, and how to configure and use WebLogic Server clusters. Additional questions cover topics like multicast and unicast communication, development versus production modes, and how to start and stop WebLogic Server instances.
Talk by Brendan Gregg for USENIX LISA 2019: Linux Systems Performance. Abstract: "
Systems performance is an effective discipline for performance analysis and tuning, and can help you find performance wins for your applications and the kernel. However, most of us are not performance or kernel engineers, and have limited time to study this topic. This talk summarizes the topic for everyone, touring six important areas of Linux systems performance: observability tools, methodologies, benchmarking, profiling, tracing, and tuning. Included are recipes for Linux performance analysis and tuning (using vmstat, mpstat, iostat, etc), overviews of complex areas including profiling (perf_events) and tracing (Ftrace, bcc/BPF, and bpftrace/BPF), and much advice about what is and isn't important to learn. This talk is aimed at everyone: developers, operations, sysadmins, etc, and in any environment running Linux, bare metal or the cloud."
This document provides an overview of Linux fundamentals, including:
- The kernel acts as an interface between hardware and software, handling processes and resource allocation.
- The userland includes standard libraries that allow programs to communicate with the kernel.
- Files are organized in a hierarchy with directories like /home for user files, /etc for configurations, and /var for variable files.
- Commands like ls, grep, and find allow viewing and searching files, while pipes, redirection, and compression utilities manage file input/output.
The document provides an overview of PHP concepts including variables, data types, functions, and more. It discusses PHP syntax like tags and comments. Key points covered include:
- PHP is a scripting language widely used for web development and is free to use
- Variables store and manipulate data in PHP and have no predefined type
- PHP has several data types including integers, doubles, strings, arrays, and objects
- Functions define reusable blocks of code and can accept parameters
- echo and print output content, with echo being marginally faster
The document provides instructions on how to configure a DNS server. It begins by explaining what a DNS server is and its purpose of translating domain names to IP addresses. It then discusses IP addresses and the differences between dynamic and static IP addresses. Finally, it provides the steps to install and configure a Microsoft DNS server using DNS Manager. These include adding the DNS component in Windows and using DNS Manager to configure the server.
- Shell scripting allows users to automate repetitive tasks by writing scripts of shell commands that can be executed automatically. The shell acts as an interface between the user and the operating system kernel, accepting commands and passing them to the kernel for execution. Common shells used for scripting include Bash, C Shell, and Korn Shell. Shell scripts use shell commands, control structures, and functions to perform automated tasks like backups and system monitoring.
In this session (reloaded for Notes V11), you will learn how easy it can be to maximize Notes client performance. Let Chris show you, what can be tuned and how to resolve the best possible performance for your Notes client infrastructure. Discover tips and tweaks - how to debug your Notes client, deal with outdated ODS, network latency and application performance issues and the measurable benefit that provides to your users. You’ll discover the current best practices for streamlining location and connection documents and why the catalog.nsf is still so important. You will leave the session with the knowledge you need to improve your Notes V11 client installations and to provide a better experience for happier administration and happier end-users!
The document discusses Splunk's HTTP Event Collector which allows sending events directly to Splunk from various sources using a token-based JSON API. It can be enabled and used to send events by creating and including an authentication token in requests. Events are sent via HTTP POST and the collector is highly performant, scalable, and available. It provides libraries for common languages and can be run on indexers or dedicated collector instances.
The document summarizes the 6 main steps of the Linux booting process:
1) BIOS performs initial checks and loads the master boot record (MBR) from the hard drive.
2) The MBR loads the GRUB boot loader.
3) GRUB loads and executes the Linux kernel and initrd images.
4) The kernel initializes hardware and mounts the initrd, then loads modules and root partition.
5) The init process reads /etc/inittab to determine the default runlevel and loads appropriate programs.
6) Runlevel programs like sendmail start based on the runlevel and sequence numbers in their names.
The document provides an overview of MongoDB sharding, including:
- Sharding allows horizontal scaling of data by partitioning a database across multiple servers or shards.
- The MongoDB sharding architecture consists of shards to hold data, config servers to store metadata, and mongos processes to route requests.
- Data is partitioned into chunks based on a shard key and chunks can move between shards as the data distribution changes.
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...Mario Heiderich
The clipboard is one of the most commonly used tools across operating systems, window managers and devices. Pressing Ctrl-C and Ctrl-V has become so fundamentally important to productivity and usability that we cannot get rid of it anymore. We happily and often thoughtlessly copy things from one source and paste them into another. URLs into address-bars, lengthy commands into console windows, text segments into web editors and mail interfaces. And we never worry about security when doing so. Because what could possibly go wrong, right?
But have we ever asked ourselves what the clipboard content actually consists of? Do we really know what it contains? And are we aware of the consequences a thoughtless copy&paste interaction can have? Who else can control the contents of the clipboard? Is it really just us doing Ctrl-C or is there other forces in the realm who are able to infect what we believe to be clean, who can desecrate what we trust so blindly that we never question or observe it?
This talk is about the clipboard and the technical details behind it. How it works, what it really contains – and who can influence its complex range of contents. We will learn about a new breed of targeted attacks, including cross-application XSS from PDF, ODT, DOC and XPS that allow to steal website accounts faster than you can click, turn your excel sheet into a monster and learn about ways to smuggle creepy payload that is hidden from sight until it executes. Oh, and we’ll also see what can be done about that and what defensive measures we achieved to create so far.
Shells are programs that interpret commands from the user and translate them into a language computers understand. The main types of shells in Linux are the Bourne shell, C shell, Korn shell, and Bourne Again shell (bash). Bash has become the default shell in most Linux distributions as it incorporates features from other shells while maintaining compatibility with the Bourne shell syntax used for scripts.
The document discusses Linux file systems. It provides an overview of Linux file system types including network file systems like NFS and SMB, and disk file systems like ext2, ext3, FAT32, and NTFS. It describes the physical structure of file systems on disk including the boot block, super block, inode list, and block list. It also summarizes the features and maximum sizes of different file system standards like ext2, ext3, ext4, ReiserFS, XFS, and JFS.
A presentation made for the AngularJS-IL meetup group that took place in May 2014 at Google TLV Campus. its a demonstration of Unit testing an AngularJS component with jasmine and karma.
Presentation covers the concept of hybrid mobile application development as well the examples, A better way to start developing applications for all platform in amount of just one, The future of application development.
Inside MongoDB: the Internals of an Open-Source DatabaseMike Dirolf
The document discusses MongoDB, including how it stores and indexes data, handles queries and replication, and supports sharding and geospatial indexing. Key points covered include how MongoDB stores data in BSON format across data files that grow in size, uses memory-mapped files for data access, supports indexing with B-trees, and replicates operations through an oplog.
Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability.
PHP is a loosely typed scripting language commonly used for web development. It was created by Rasmus Lerdorf in 1995 and has evolved through several versions. PHP code is interpreted at runtime and allows for features like conditionals, loops, functions, classes, and objects to build dynamic web applications.
Slides for meetup @Talentica Software on 25th January 2020
Topics Covered:
1. Dependency Injection
2. Ng-schematics
3. How to structure your apps
4. Deployment
This document summarizes a presentation about hacking Ansible to make it more customizable. It discusses how Ansible's plugin system allows it to be extended through modules, filters, lookups, callbacks and caches. Examples are provided of extending Ansible's core functionality by modifying files in the lib directory and writing custom plugins. The presentation also outlines how Ansible's object model works and provides an overview of its growth in modules and plugins over time.
WebLogic FAQs provide answers to common questions about Oracle WebLogic Server. The document includes questions about what WebLogic Server is, its basic components like domains and managed servers, how administration servers and managed servers interact, and how to configure and use WebLogic Server clusters. Additional questions cover topics like multicast and unicast communication, development versus production modes, and how to start and stop WebLogic Server instances.
Talk by Brendan Gregg for USENIX LISA 2019: Linux Systems Performance. Abstract: "
Systems performance is an effective discipline for performance analysis and tuning, and can help you find performance wins for your applications and the kernel. However, most of us are not performance or kernel engineers, and have limited time to study this topic. This talk summarizes the topic for everyone, touring six important areas of Linux systems performance: observability tools, methodologies, benchmarking, profiling, tracing, and tuning. Included are recipes for Linux performance analysis and tuning (using vmstat, mpstat, iostat, etc), overviews of complex areas including profiling (perf_events) and tracing (Ftrace, bcc/BPF, and bpftrace/BPF), and much advice about what is and isn't important to learn. This talk is aimed at everyone: developers, operations, sysadmins, etc, and in any environment running Linux, bare metal or the cloud."
This document provides an overview of Linux fundamentals, including:
- The kernel acts as an interface between hardware and software, handling processes and resource allocation.
- The userland includes standard libraries that allow programs to communicate with the kernel.
- Files are organized in a hierarchy with directories like /home for user files, /etc for configurations, and /var for variable files.
- Commands like ls, grep, and find allow viewing and searching files, while pipes, redirection, and compression utilities manage file input/output.
The document provides an overview of PHP concepts including variables, data types, functions, and more. It discusses PHP syntax like tags and comments. Key points covered include:
- PHP is a scripting language widely used for web development and is free to use
- Variables store and manipulate data in PHP and have no predefined type
- PHP has several data types including integers, doubles, strings, arrays, and objects
- Functions define reusable blocks of code and can accept parameters
- echo and print output content, with echo being marginally faster
The document provides instructions on how to configure a DNS server. It begins by explaining what a DNS server is and its purpose of translating domain names to IP addresses. It then discusses IP addresses and the differences between dynamic and static IP addresses. Finally, it provides the steps to install and configure a Microsoft DNS server using DNS Manager. These include adding the DNS component in Windows and using DNS Manager to configure the server.
- Shell scripting allows users to automate repetitive tasks by writing scripts of shell commands that can be executed automatically. The shell acts as an interface between the user and the operating system kernel, accepting commands and passing them to the kernel for execution. Common shells used for scripting include Bash, C Shell, and Korn Shell. Shell scripts use shell commands, control structures, and functions to perform automated tasks like backups and system monitoring.
In this session (reloaded for Notes V11), you will learn how easy it can be to maximize Notes client performance. Let Chris show you, what can be tuned and how to resolve the best possible performance for your Notes client infrastructure. Discover tips and tweaks - how to debug your Notes client, deal with outdated ODS, network latency and application performance issues and the measurable benefit that provides to your users. You’ll discover the current best practices for streamlining location and connection documents and why the catalog.nsf is still so important. You will leave the session with the knowledge you need to improve your Notes V11 client installations and to provide a better experience for happier administration and happier end-users!
The document discusses Splunk's HTTP Event Collector which allows sending events directly to Splunk from various sources using a token-based JSON API. It can be enabled and used to send events by creating and including an authentication token in requests. Events are sent via HTTP POST and the collector is highly performant, scalable, and available. It provides libraries for common languages and can be run on indexers or dedicated collector instances.
The document summarizes the 6 main steps of the Linux booting process:
1) BIOS performs initial checks and loads the master boot record (MBR) from the hard drive.
2) The MBR loads the GRUB boot loader.
3) GRUB loads and executes the Linux kernel and initrd images.
4) The kernel initializes hardware and mounts the initrd, then loads modules and root partition.
5) The init process reads /etc/inittab to determine the default runlevel and loads appropriate programs.
6) Runlevel programs like sendmail start based on the runlevel and sequence numbers in their names.
The document provides an overview of MongoDB sharding, including:
- Sharding allows horizontal scaling of data by partitioning a database across multiple servers or shards.
- The MongoDB sharding architecture consists of shards to hold data, config servers to store metadata, and mongos processes to route requests.
- Data is partitioned into chunks based on a shard key and chunks can move between shards as the data distribution changes.
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...Mario Heiderich
The clipboard is one of the most commonly used tools across operating systems, window managers and devices. Pressing Ctrl-C and Ctrl-V has become so fundamentally important to productivity and usability that we cannot get rid of it anymore. We happily and often thoughtlessly copy things from one source and paste them into another. URLs into address-bars, lengthy commands into console windows, text segments into web editors and mail interfaces. And we never worry about security when doing so. Because what could possibly go wrong, right?
But have we ever asked ourselves what the clipboard content actually consists of? Do we really know what it contains? And are we aware of the consequences a thoughtless copy&paste interaction can have? Who else can control the contents of the clipboard? Is it really just us doing Ctrl-C or is there other forces in the realm who are able to infect what we believe to be clean, who can desecrate what we trust so blindly that we never question or observe it?
This talk is about the clipboard and the technical details behind it. How it works, what it really contains – and who can influence its complex range of contents. We will learn about a new breed of targeted attacks, including cross-application XSS from PDF, ODT, DOC and XPS that allow to steal website accounts faster than you can click, turn your excel sheet into a monster and learn about ways to smuggle creepy payload that is hidden from sight until it executes. Oh, and we’ll also see what can be done about that and what defensive measures we achieved to create so far.
Shells are programs that interpret commands from the user and translate them into a language computers understand. The main types of shells in Linux are the Bourne shell, C shell, Korn shell, and Bourne Again shell (bash). Bash has become the default shell in most Linux distributions as it incorporates features from other shells while maintaining compatibility with the Bourne shell syntax used for scripts.
The document discusses Linux file systems. It provides an overview of Linux file system types including network file systems like NFS and SMB, and disk file systems like ext2, ext3, FAT32, and NTFS. It describes the physical structure of file systems on disk including the boot block, super block, inode list, and block list. It also summarizes the features and maximum sizes of different file system standards like ext2, ext3, ext4, ReiserFS, XFS, and JFS.
A presentation made for the AngularJS-IL meetup group that took place in May 2014 at Google TLV Campus. its a demonstration of Unit testing an AngularJS component with jasmine and karma.
Presentation covers the concept of hybrid mobile application development as well the examples, A better way to start developing applications for all platform in amount of just one, The future of application development.
The document discusses Test-Driven Development (TDD). Some key points:
- TDD involves writing automated tests before writing code to ensure tests fail initially and then passing the tests by writing just enough code. This prevents writing extra code and helps design code structure.
- TDD provides benefits like confidence in code quality, catching errors early, and giving feedback on changes. Unit tests should initially fail, test individual components, and not be for finding bugs which is done through manual testing.
- The basic TDD process is to create a failing test, write just enough code to pass the test, refactor code, and repeat the process for each new feature or change. This helps integrate TDD into
Sass is a scripting language that is interpreted into Cascading Style Sheets (CSS). SassScript is the scripting language itself. Sass consists of two syntaxes. The original syntax, called "the indented syntax", uses a syntax similar to Haml.
Unit testing frameworks like Jasmine and Mocha can be used to write unit tests in Angular. Jasmine requires less setup and is fully BDD compliant. Tests are organized into describe blocks for test suites and it blocks for individual specs. Expectations are made using the expect function and matcher functions. Spies can mock and spy on functions. Karma is a test runner that runs tests across browsers and re-runs on file changes. It is configured via a karma.conf.js file. Unit tests validate controllers, services, and other application code. End-to-end tests using Protractor validate full user workflows and interactions.
This session talks about how unit testing of Spark applications is done, as well as tells the best way to do it. This includes writing unit tests with and without Spark Testing Base package, which is a spark package containing base classes to use when writing tests with Spark.
Angular 2.0 aims to build a complete platform for web applications by improving performance, developer productivity, and versatility compared to AngularJS 1.x. Key goals include making the framework faster, simpler, and more modular. It focuses on improved change detection, lazy loading of code, and support for features like universal rendering. Major companies like Capital One, The Weather Channel, and LucidChart adopted Angular 2.0 to build applications with better performance, collaboration, and maintenance. The framework saw contributions from an active open source community and remains one of the most popular JavaScript frameworks.
The document discusses Angular 2.0 change detection. It describes how Angular 2.0 change detection is more efficient and predictable compared to Angular 1.x by using a component-based approach rather than a graph. Each component has its own change detector that is generated at compile time. Change detection occurs top-down via the change detection tree. The document also discusses strategies like OnPush, immutable objects, observables, and manually controlling change detection.
Jasmine is a BDD framework for testing JavaScript code. It does not depend on other frameworks and does not require a DOM. Jasmine uses specs, expectations, suites, and matchers to define tests and make assertions. It also supports features for testing asynchronous code and spying on functions. Jasmine provides tools like spies, stubs, fakes, and mocks to help test code behavior.
Intro to testing Javascript with jasmineTimothy Oxley
Testing with Jasmine provides a framework for writing and running unit tests in JavaScript. It uses a behavior-driven development (BDD) style in which each test specifies the expected behavior it is testing using a describe and it blocks. Within the it block, expect statements make assertions about the code being tested using matchers like toEqual. Jasmine provides spies for mocking function calls and stubs. Running tests involves including Jasmine library files and specs in an HTML page and executing them with a simple HTTP server. Jasmine can also be used to test views by creating DOM fixtures and making assertions about the rendered markup.
AngularJs 2.0 introduces components as the fundamental building blocks, replacing directives. The presentation covers getting started with AngularJs 2.0, including dependencies, configuration, components, data binding, services, routing and migration from Angular 1. It emphasizes that Angular 2 is a rewrite built on newer standards to improve performance and reduce opinionation. Migration involves componentizing the application and using an upgrade adapter to support a hybrid Angular 1 and 2 app.
Knockout is a JavaScript library that helps you to create responsive display(UI)
It is based on Model–view–viewmodel (MVVM) pattern
It provides a simple two-way data binding mechanism between your data model and UI
It was developed and is maintained as an open source project by Steve Sanderson, a Microsoft employee on July 5, 2010
Functional programming is a paradigm which concentrates on computing results rather than on performing actions. That is, when you call a function, the only significant effect that the function has is usually to compute a value and return it.
HTML5, CSS, JavaScript Style guide and coding conventionsKnoldus Inc.
Coding conventions are style guidelines for any programming language. As, we are growing ourselves rapidly in learning new technology, the need for learning of the coding standards and conventions for the same language also arises.
So, here let us try to learn some coding guidelines for few frontend languages.
Casandra is a open-source, distributed, highly scalable and fault-tolerant database. It is a best choice for managing structured, semi-structured or unstructured data at a large amount.
Presentation made for the NG-CONF Israel 2015
(http://ng-conf.co.il/)
Angular2 is just around the corner.. so, how can we prepare our angular 1.x code base to the migration?
An example project that come along with those slides available on Github (links inside)
Quasiquotes are a neat notation that lets you manipulate Scala syntax trees (AST) with ease. Quotation syntax is in just another usage of extensible string interpolation.
Apache Flink Crash Course by Slim Baltagi and Srini PalthepuSlim Baltagi
In this hands-on Apache Flink presentation, you will learn in a step-by-step tutorial style about:
• How to setup and configure your Apache Flink environment: Local/VM image (on a single machine), cluster (standalone), YARN, cloud (Google Compute Engine, Amazon EMR, ... )?
• How to get familiar with Flink tools (Command-Line Interface, Web Client, JobManager Web Interface, Interactive Scala Shell, Zeppelin notebook)?
• How to run some Apache Flink example programs?
• How to get familiar with Flink's APIs and libraries?
• How to write your Apache Flink code in the IDE (IntelliJ IDEA or Eclipse)?
• How to test and debug your Apache Flink code?
• How to deploy your Apache Flink code in local, in a cluster or in the cloud?
• How to tune your Apache Flink application (CPU, Memory, I/O)?
This document provides an overview of unit testing AngularJS applications using Karma, Jasmine, and Angular mocks. It discusses how to set up tests using Karma and Jasmine, write specs using matchers and spies, and mock dependencies using Angular mocks. Key points covered include isolating units of code for testing, using Karma to run tests in browsers, the structure of Jasmine specs, and mocking HTTP requests and other services.
Unit testing in JavaScript? There is no such thing.” This is something most of the Java developers would say. With AngularJS coming more and more to scene and Google standing behind it, testing is starting to be core part of all AngularJS project. I would like to show how you can do unit testing in pure JavaScript (AngularJS) application (together with backend mocking…).
This document provides an introduction to unit testing JavaScript code with Jasmine and Karma. It discusses the basics of Jasmine including test suites, specs, expectations, and matchers. It then covers how to set up and run tests with Karma, including configuring Karma, running tests in browsers, handling failures, and testing AngularJS code. Specific topics covered include spies, $httpBackend for mocking HTTP requests, and testing controllers and dependencies injection.
Unit testing of java script and angularjs application using Karma Jasmine Fra...Samyak Bhalerao
The document discusses unit testing of JavaScript and AngularJS applications using the Karma-Jasmine framework. It covers what testing and unit testing are, introduces the Karma test runner and Jasmine testing framework, and provides details on setting up Karma configuration files and writing tests using Jasmine specifications and matchers. The document also outlines how to test various aspects of AngularJS applications like controllers, services, directives and HTTP requests.
This document discusses test-driven development with Jasmine and Karma. It justifies TDD for JavaScript, provides an overview of TDD and its benefits. It then explains the basics of Jasmine including suites, specifications, matchers and spies. Finally it covers configuring Karma and using tools like PhantomJS for running tests and karma-coverage for generating code coverage reports.
Angular Unit testing
Introduction to Angular Unit testing
Angular Test Cases are automated tests written to check the functionality of an Angular application.
These tests are designed to ensure that the application is working as expected and that all components are functioning correctly.
Angular Test Cases provide a way to quickly and accurately verify that the application is working properly.
They can also be used to quickly identify any bugs or errors that may have been introduced during development.
Why do we use Angular test cases?
Using Angular test cases is important for ensuring the quality of your application's codebase.
Test cases help to detect bugs and errors in the code quickly, so that the development team can address them and fix them before they become bigger problems.
Test cases also help to make sure that new features are implemented correctly and that existing features continue to work as expected.
Finally, using test cases can help to reduce the risk of introducing new bugs into the codebase.
Unit Testing
Testing single unit of code in isolation from the rest of the code which tests behavior of a function or class
Unit testing with Jasmine and Karma for Angular Apps!
Jasmine
Jasmine is an open-source JavaScript testing framework.
JavaScript testing framework provides building blocks to write JavaScript unit test cases so each line of JavaScript statement is properly unit tested.
It is used to test any type of JavaScript application.
Jasmine is a BDD (Behavior Driven Development)
In BDD Test are written in Non-technical language so everyone can understand it easily.
BDD manly focus on the testing the behavior of code rather than implementation.
Writing test cases with Jasmine
Test cases in Jasmine are written using the ‘describe’ and ‘it’ functions. The ‘describe’ function is used to create a suite of tests, while the ‘it’ function is used to define the individual test cases.
To create a test case, first the ‘describe’ function is used to create a suite of tests and assign it a name. Then the ‘it’ function is used to define the individual test cases within the suite.
For each test case, you define the behavior you expect from the JavaScript application. You can also use assertions to test the output of the application.
Flow of Unit Test case
The Angular testing package includes two utilities called TestBed and async.
TestBed is the main Angular utility package.
The describe container contains different blocks (it, beforeEach, xit, etc.).beforeEach runs before any other block.
Karma
Karma is a testing automation tool created by the Angular JS team.
Karma is Open source tool.
Karma is a tool made on top of NodeJS to run JavaScript test cases. This is not a testing framework like Jasmine or Mocha or Chai etc.
It only allows us to run JavaScript test cases written using testing frameworks like Jasmine.
Karma allow us to execute the test cases on any browsers.
Slaven tomac unit testing in angular jsSlaven Tomac
This document discusses tools for testing AngularJS applications, including Karma for running tests, Jasmine for assertions, and Angular Mocks for mocking dependencies. It provides an overview of what to test in Angular applications, such as directives, services, controllers, and filters. Examples are given for testing scope, application workflow using controllers, and DOM changes using directives. The document recommends setting up automated testing and continuous integration using Yeoman and Grunt.
JavaScript Test-Driven Development with Jasmine 2.0 and Karma Christopher Bartling
This document discusses JavaScript test-driven development using Jasmine 2.0 and Karma. It introduces test-driven development principles and benefits, then covers the Karma test runner, PhantomJS browser, and features of the Jasmine testing framework including describe blocks, expectations, matchers, spies, and custom matchers. It also provides an example of mapping earthquakes and testing color-coded circles using magnitude and discusses code coverage and sustaining test-driven practices.
This document provides an overview of various tools for testing AngularJS applications, including testing frameworks like Jasmine and Mocha, unit testing with Karma and ngMock, end-to-end testing with Protractor, and automating tasks with Grunt. It describes the purpose and basic usage of these tools, provides code examples, and lists additional resources for learning more.
AngularJS Unit Testing w/Karma and Jasminefoxp2code
This document provides instructions for setting up Angular unit testing with Karma and Jasmine. It discusses initializing Karma and Jasmine via NPM, configuring Karma, adding Angular and Angular mocks via Bower, writing describe and it blocks for tests, and using matchers and mocks like $httpBackend. The live coding section at the end indicates the document will demonstrate these concepts in real tests.
Quick tour to front end unit testing using jasmineGil Fink
This document discusses front-end unit testing using the Jasmine testing framework. It explains why unit testing is important, introduces behavior-driven development and the Jasmine framework. It also provides an overview of setting up Jasmine, creating test suites and specs, using matchers, and testing asynchronous code. The document demonstrates how to set up the testing environment, write tests with Jasmine, and integrate Jasmine with the Karma test runner.
A simple setup on automated unit test using Karma + Jasmine with AngularJS
Link to GitHub for Source Code : https://github.com/kyaroru/IonicUnitTest
Quick Tour to Front-End Unit Testing Using JasmineGil Fink
This document provides an overview of unit testing JavaScript code using the Jasmine testing framework. It discusses why unit testing is important, how to set up Jasmine and Karma for testing, and how to write different types of tests in Jasmine including suites, specs, expectations, matchers, spies, and async support. The document includes code examples and recommends unit testing JavaScript code to increase confidence and catch bugs early in the development process.
This document discusses unit testing JavaScript code using the Jasmine testing framework. It provides an overview of unit testing, behavior driven development (BDD) and how Jasmine supports BDD style testing. It demonstrates how to set up Jasmine, create test suites and specs, use matchers for expectations, and work with spies and async code. The document also discusses how to integrate Jasmine with Karma, a test runner that allows executing tests across multiple browsers.
An Introduction To Testing In AngularJS Applications Rohan Chandane
This document provides an overview of testing Angular JS applications. It discusses the limitations of jQuery for building web applications and how Angular JS addresses these through its MVC-based framework. It then covers unit testing Angular JS applications using Jasmine, including suites, specs, matchers, spies, mocks and stubs. The document also discusses end-to-end testing with Protractor and tools for automating testing like Karma, Yeoman, Grunt and IDE plugins.
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
Description
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
## Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
We build our CFCs and CF API to be consumed with CF Apps, Mobile Apps, Javascript apps and devices we haven’t even thought about yet. To be smart developers we need to be able to test our CFC endpoints, and the code that uses those endpoints.
We’ll learn how to test your API serverside with Testbox and Clientside with Jasmine.
With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.
Attendees should have some exposure to CFCs as endpoints, or CF API creations, and consuming with other languages/devices, in this case, JavaScript.
Attendees will learn
How to use Testbox to test your CFCs 2 different ways
Different types and ways to test JavaScript
Overview of client/server side testing tools
Building testing into your workflow
You are one of many that are not testing your APIs thoroughly
This document discusses testing AngularJS applications. It introduces popular testing frameworks like Jasmine and Karma that can be used to write unit tests and automate testing. Jasmine is typically used for testing AngularJS code and examples are given of writing tests with Jasmine. Karma is presented as a tool to automate testing by running tests in browsers. Protractor is introduced for end-to-end testing of front-end DOM elements. The document argues that front-end testing will become more important and integrated into development as tools continue to improve.
Angular Hydration Presentation (FrontEnd)Knoldus Inc.
In this Nashknolx session, we will learn how to renders applications on the server side and then sends them to the client. It includes faster initial load times, superior SEO, and improved performance. Hydration is the process that restores the server-side rendered application on the client. This includes things like reusing the server rendered DOM structures, persisting the application state, transferring application data that was retrieved already by the server, and other processes.
Optimizing Test Execution: Heuristic Algorithm for Self-HealingKnoldus Inc.
Take your test automation to the next level by optimizing test execution with heuristic algorithms. Develop algorithms that detect and fix test failures in real-time, reducing maintenance and increasing efficiency. Unleash the power of optimized testing.
Self-Healing Test Automation Framework - HealeniumKnoldus Inc.
Revolutionize your test automation with Healenium's self-healing framework. Automate test maintenance, reduce flakes, and increase efficiency. Learn how to build a robust test automation foundation. Discover the power of self-healing tests. Transform your testing experience.
Kanban Metrics Presentation (Project Management)Knoldus Inc.
Kanban flow metrics are key performance indicators (KPIs) used to measure team’s performance using Kanban. They help you deliver large and complex projects without failing. The session will cover on how Kanban flow metrics can be used to optimize delivery.
Java 17 features and implementation.pptxKnoldus Inc.
This session will cover the most significant new features introduced in Java 17 and demonstrate how to effectively implement them in your projects. This session is ideal for Java developers, architects, and technical leads who want to stay current with the latest advancements in the Java ecosystem and leverage Java 17 to build robust, modern applications.
Chaos Mesh Introducing Chaos in KubernetesKnoldus Inc.
Chaos Mesh brings various types of fault simulation to Kubernetes and has an enormous capability to orchestrate fault scenarios. It helps to conveniently simulate various abnormalities that might occur in reality during the development, testing, and production environments and find potential problems in the system.
GraalVM - A Step Ahead of JVM PresentationKnoldus Inc.
Explore the capabilities of GraalVM in our upcoming session, where we will cover key aspects such as optimizing startup times, enhancing resource efficiency, and enabling seamless language interoperability. Learn how GraalVM can significantly improve your application's performance and versatility by reducing latency, maximizing resource utilization, and facilitating the smooth integration of multiple programming languages.
Nomad by HashiCorp Presentation (DevOps)Knoldus Inc.
Nomad is a workload orchestrator designed by HashiCorp to deploy and manage containers and non-containerized applications across on-premises and cloud environments. It is a single binary that schedules applications and services on a cluster of machines and is highly scalable and performant. Nomad is known for its simplicity and flexibility, offering developers and operators a unified workflow to deploy applications. Nomad supports containerized, virtualized, and standalone applications, and its workload support includes Docker, Windows, QEMU, and Java. It integrates seamlessly with other HashiCorp tools like Consul for service discovery and Vault for secrets management, providing a full-stack solution for infrastructure management.
Nomad by HashiCorp Presentation (DevOps)Knoldus Inc.
Nomad is a workload orchestrator designed by HashiCorp to deploy and manage containers and non-containerized applications across on-premises and cloud environments. It is a single binary that schedules applications and services on a cluster of machines and is highly scalable and performant. Nomad is known for its simplicity and flexibility, offering developers and operators a unified workflow to deploy applications. Nomad supports containerized, virtualized, and standalone applications, and its workload support includes Docker, Windows, QEMU, and Java. It integrates seamlessly with other HashiCorp tools like Consul for service discovery and Vault for secrets management, providing a full-stack solution for infrastructure management.
DAPR - Distributed Application Runtime PresentationKnoldus Inc.
Discover Dapr: The open-source runtime that simplifies microservices development with powerful building blocks for service invocation, state management, and more. Learn how Dapr's sidecar architecture enhances scalability and interoperability across multiple programming languages.
Introduction to Azure Virtual WAN PresentationKnoldus Inc.
A Virtual WAN (Wide Area Network) is a networking service offered by cloud providers like Microsoft Azure that allows organizations to connect their branch offices, data centers, and remote users to their main network in a scalable, secure, and efficient manner.
Introduction to Argo Rollouts PresentationKnoldus Inc.
Argo Rollouts is a Kubernetes controller and set of CRDs that provide advanced deployment capabilities such as blue-green, canary, canary analysis, experimentation, and progressive delivery features to Kubernetes. Argo Rollouts (optionally) integrates with ingress controllers and service meshes, leveraging their traffic shaping abilities to shift traffic to the new version during an update gradually. Additionally, Rollouts can query and interpret metrics from various providers to verify key KPIs and drive automated promotion or rollback during an update.
Intro to Azure Container App PresentationKnoldus Inc.
Azure Container Apps is a serverless platform that allows you to maintain less infrastructure and save costs while running containerized applications. Instead of worrying about server configuration, container orchestration, and deployment details, Container Apps provides all the up-to-date server resources required to keep your applications stable and secure.
Insights Unveiled Test Reporting and Observability ExcellenceKnoldus Inc.
Effective test reporting involves creating meaningful reports that extract actionable insights. Enhancing observability in the testing process is crucial for making informed decisions. By employing robust practices, testers can gain valuable insights, ensuring thorough analysis and improvement of the testing strategy for optimal software quality.
Introduction to Splunk Presentation (DevOps)Knoldus Inc.
As simply as possible, we offer a big data platform that can help you do a lot of things better. Using Splunk the right way powers cybersecurity, observability, network operations and a whole bunch of important tasks that large organizations require.
Code Camp - Data Profiling and Quality Analysis FrameworkKnoldus Inc.
A Data Profiling and Quality Analysis Framework is a systematic approach or set of tools used to assess the quality, completeness, consistency, and integrity of data within a dataset or database. It involves analyzing various attributes of the data, such as its structure, patterns, relationships, and values, to identify anomalies, errors, or inconsistencies.
AWS: Messaging Services in AWS PresentationKnoldus Inc.
Asynchronous messaging allows services to communicate by sending and receiving messages via a queue. This enables services to remain loosely coupled and promote service discovery. To implement each of these message types, AWS offers various managed services such as Amazon SQS, Amazon SNS, Amazon EventBridge, Amazon MQ, and Amazon MSK. These services have unique features tailored to specific needs.
Amazon Cognito: A Primer on Authentication and AuthorizationKnoldus Inc.
Amazon Cognito is a service provided by Amazon Web Services (AWS) that facilitates user identity and access management in the cloud. It's commonly used for building secure and scalable authentication and authorization systems for web and mobile applications.
ZIO Http A Functional Approach to Scalable and Type-Safe Web DevelopmentKnoldus Inc.
Explore the transformative power of ZIO HTTP - a powerful, purely functional library designed for building highly scalable, concurrent and type-safe HTTP service. Delve into seamless integration of ZIO's powerful features offering a robust foundation for building composable and immutable web applications.
Managing State & HTTP Requests In Ionic.Knoldus Inc.
Ionic is a complete open-source SDK for hybrid mobile app development created by Max Lynch, Ben Sperry, and Adam Bradley of Drifty Co. in 2013.The original version was released in 2013 and built on top of AngularJS and Apache Cordova. However, the latest release was re-built as a set of Web Components using StencilJS, allowing the user to choose any user interface framework, such as Angular, React or Vue.js. It also allows the use of Ionic components with no user interface framework at all.[4] Ionic provides tools and services for developing hybrid mobile, desktop, and progressive web apps based on modern web development technologies and practices, using Web technologies like CSS, HTML5, and Sass. In particular, mobile apps can be built with these Web technologies and then distributed through native app stores to be installed on devices by utilizing Cordova or Capacitor.
Providing Better Biodiversity Through Better DataSafe Software
This session explores how FME is transforming data workflows at Ireland’s National Biodiversity Data Centre (NBDC) by eliminating manual data manipulation, incorporating machine learning, and enhancing overall efficiency. Attendees will gain insight into how NBDC is using FME to document and understand internal processes, make decision-making fully transparent, and shine a light on underlying code to improve clarity and reduce silent failures.
The presentation will also outline NBDC’s future plans for FME, including empowering staff to access and query data independently, without relying on external consultants. It will also showcase ambitions to connect to new data sources, unlock the full potential of its valuable datasets, create living atlases, and place its valuable data directly into the hands of decision-makers across Ireland—ensuring that biodiversity is not only protected but actively enhanced.
FME for Climate Data: Turning Big Data into Actionable InsightsSafe Software
Regional and local governments aim to provide essential services for stormwater management systems. However, rapid urbanization and the increasing impacts of climate change are putting growing pressure on these governments to identify stormwater needs and develop effective plans. To address these challenges, GHD developed an FME solution to process over 20 years of rainfall data from rain gauges and USGS radar datasets. This solution extracts, organizes, and analyzes Next Generation Weather Radar (NEXRAD) big data, validates it with other data sources, and produces Intensity Duration Frequency (IDF) curves and future climate projections tailored to local needs. This presentation will showcase how FME can be leveraged to manage big data and prioritize infrastructure investments.
NTRODUCTION TO SOFTWARE TESTING
• Definition:
• Software testing is the process of evaluating and
verifying that a software application or system meets
specified requirements and functions correctly.
• Purpose:
• Identify defects and bugs in the software.
• Ensure the software meets quality standards.
• Validate that the software performs as intended in
various scenarios.
• Importance:
• Reduces risks associated with software failures.
• Improves user satisfaction and trust in the product.
• Enhances the overall reliability and performance of
the software
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdfVarsha Nayak
In recent years, organizations have increasingly sought robust open source alternative to Jasper Reports as the landscape of open-source reporting tools rapidly evolves. While Jaspersoft has been a longstanding choice for generating complex business intelligence and analytics reports, factors such as licensing changes and growing demands for flexibility have prompted many businesses to explore other options. Among the most notable alternatives to Jaspersoft, Helical Insight stands out for its powerful open-source architecture, intuitive analytics, and dynamic dashboard capabilities. Designed to be both flexible and budget-friendly, Helical Insight empowers users with advanced features—such as in-memory reporting, extensive data source integration, and customizable visualizations—making it an ideal solution for organizations seeking a modern, scalable reporting platform. This article explores the future of open-source reporting and highlights why Helical Insight and other emerging tools are redefining the standards for business intelligence solutions.
Join the Denver Marketo User Group, Captello and Integrate as we dive into the best practices, tools, and strategies for maintaining robust, high-performing databases. From managing vendors and automating orchestrations to enriching data for better insights, this session will unpack the key elements that keep your data ecosystem running smoothly—and smartly.
We will hear from Steve Armenti, Twelfth, and Aaron Karpaty, Captello, and Frannie Danzinger, Integrate.
How the US Navy Approaches DevSecOps with Raise 2.0Anchore
Join us as Anchore's solutions architect reveals how the U.S. Navy successfully approaches the shift left philosophy to DevSecOps with the RAISE 2.0 Implementation Guide to support its Cyber Ready initiative. This session will showcase practical strategies for defense application teams to pivot from a time-intensive compliance checklist and mindset to continuous cyber-readiness with real-time visibility.
Learn how to break down organizational silos through RAISE 2.0 principles and build efficient, secure pipeline automation that produces the critical security artifacts needed for Authorization to Operate (ATO) approval across military environments.
Code and No-Code Journeys: The Coverage OverlookApplitools
Explore practical ways to expand visual and functional UI coverage without deep coding or heavy maintenance in this session. Session recording and more info at applitools.com
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...Natan Silnitsky
In a world where speed, resilience, and fault tolerance define success, Wix leverages Kafka to power asynchronous programming across 4,000 microservices. This talk explores four key patterns that boost developer velocity while solving common challenges with scalable, efficient, and reliable solutions:
1. Integration Events: Shift from synchronous calls to pre-fetching to reduce query latency and improve user experience.
2. Task Queue: Offload non-critical tasks like notifications to streamline request flows.
3. Task Scheduler: Enable precise, fault-tolerant delayed or recurring workflows with robust scheduling.
4. Iterator for Long-running Jobs: Process extensive workloads via chunked execution, optimizing scalability and resilience.
For each pattern, we’ll discuss benefits, challenges, and how we mitigate drawbacks to create practical solutions
This session offers actionable insights for developers and architects tackling distributed systems, helping refine microservices and adopting Kafka-driven async excellence.
Who will create the languages of the future?Jordi Cabot
Will future languages be created by language engineers?
Can you "vibe" a DSL?
In this talk, we will explore the changing landscape of language engineering and discuss how Artificial Intelligence and low-code/no-code techniques can play a role in this future by helping in the definition, use, execution, and testing of new languages. Even empowering non-tech users to create their own language infrastructure. Maybe without them even realizing.
Top 5 Task Management Software to Boost Productivity in 2025Orangescrum
In this blog, you’ll find a curated list of five powerful task management tools to watch in 2025. Each one is designed to help teams stay organized, improve collaboration, and consistently hit deadlines. We’ve included real-world use cases, key features, and data-driven insights to help you choose what fits your team best.
In this session we cover the benefits of a migration to Cosmos DB, migration paths, common pain points and best practices. We share our firsthand experiences and customer stories. Adiom is the trusted partner for migration solutions that enable seamless online database migrations from MongoDB to Cosmos DB vCore, and DynamoDB to Cosmos DB for NoSQL.
In a tight labor market and tighter economy, PMOs and resource managers must ensure that every team member is focused on the highest-value work. This session explores how AI reshapes resource planning and empowers organizations to forecast capacity, prevent burnout, and balance workloads more effectively, even with shrinking teams.
Have you upgraded your application from Qt 5 to Qt 6? If so, your QML modules might still be stuck in the old Qt 5 style—technically compatible, but far from optimal. Qt 6 introduces a modernized approach to QML modules that offers better integration with CMake, enhanced maintainability, and significant productivity gains.
In this webinar, we’ll walk you through the benefits of adopting Qt 6 style QML modules and show you how to make the transition. You'll learn how to leverage the new module system to reduce boilerplate, simplify builds, and modernize your application architecture. Whether you're planning a full migration or just exploring what's new, this session will help you get the most out of your move to Qt 6.
14 Years of Developing nCine - An Open Source 2D Game FrameworkAngelo Theodorou
A 14-year journey developing nCine, an open-source 2D game framework.
This talk covers its origins, the challenges of staying motivated over the long term, and the hurdles of open-sourcing a personal project while working in the game industry.
Along the way, it’s packed with juicy technical pills to whet the appetite of the most curious developers.
FME as an Orchestration Tool - Peak of Data & AI 2025Safe Software
Processing huge amounts of data through FME can have performance consequences, but as an orchestration tool, FME is brilliant! We'll take a look at the principles of data gravity, best practices, pros, cons, tips and tricks. And of course all spiced up with relevant examples!
Wondershare PDFelement Pro 11.4.20.3548 Crack Free DownloadPuppy jhon
➡ 🌍📱👉COPY & PASTE LINK👉👉👉 ➤ ➤➤ https://drfiles.net/
Wondershare PDFelement Professional is professional software that can edit PDF files. This digital tool can manipulate elements in PDF documents.
Wondershare PDFelement Pro 11.4.20.3548 Crack Free DownloadPuppy jhon
Unit Testing and Coverage for AngularJS
1. Unit Testing and Coverage for AngularJS
Sumit Khanduri
Software Consultant
Knoldus Software LLP
2. Introduction
● Unit testing, as the name implies, is about testing
individual units of code.
● "Did I think about the logic correctly?" or "Does the sort
function order the list in the right order?"
● The primary goal of unit testing is to take the smallest
piece of testable software in the application.
3. Testing AngularJS App`s
● AngularJS build around the concept of dependency injection & loose
coupling to the DOM which make it testable.
● Angular comes with dependency injection built-in, which makes testing
components much easier, because you can pass in a component's
dependencies and mock them as you wish.
● Components that have their dependencies injected allow them to be
easily mocked on a test by test basis, without having to mess with any
global variables that could accidentally affect another test.
5. ● Karma is a JavaScript command line tool that can be
used to spawn a web server which loads your
application's source code and executes your tests.
● You can configure Karma to run against a number of
browsers.
● Karma is a NodeJS application, and should be
installed through npm.
6. The main goal for Karma is to bring a productive testing environment to
developers. The environment being one where they don't have to set up
loads of configurations, but rather a place where developers can just
write the code and get instant feedback from their tests. Because getting
quick feedback is what makes you productive and creative.
http://karma-runner.github.io/
7. Jasmine is a behavior-driven development framework for testing
JavaScript code. It does not depend on any other JavaScript
frameworks. It does not require a DOM. And it has a clean, obvious
syntax so that you can easily write tests.
http://jasmine.github.io/
8. Unit Test Strucuture - Specs
it('should increment a variable', function () {
var foo = 0; // set up the world
foo++; // call your application code
expect(foo).toEqual(1); // passes because foo == 1
});
9. Unit Test Structure – Suites
Collections of specs
Your test files will contain one or more suites, each with one or
more specs.
describe("User Validation", function() {
it("requires a name", function() {
//spec content
})
it("does not validate invalid names", function() {
//spec content
})
});
10. Unit Test Structure – expect()
expect() is the actual 'test'
Takes a value, then 'matchers'
it('should increment a variable', function () {
var foo = 0; // set up the world
foo++; // call your application code
expect(foo).toEqual(1); // passes because foo == 1
});
11. Mocking in Jasmine
A test is not a unit test if:
1. It talks to the database
2. It communicates across the network
3. It touches the file system
4. It can't run correctly at the same time as any of your other unit
tests
5. You have to do special things to your environment (such as
editing config files) to run it.
~ Michael Feathers
Need to use mocks to simulate calls to external services, files, etc
Need to use mocks to reduce real dependencies in tests.
12. Mock HTTP ($httpBackend)
● Fake HTTP backend implementation suitable for unit testing
applications that use the $http service.
● Example:
mockHttpBackend.expect('POST',config.serverURL+
'admin/login',{'email':'','password':''}).respond({ data : {}
});
14. Mocking in Jasmine – Spies
● Easily inject mock/monitoring objects
● Replaces or wraps the function it's spying on
● Gives run-time statistics on the spied function
● Know how many times a function has been called
● Inspect return values
● Inspect parameters
it('should run Successfully', function() {
spyOn(mockState, 'go');
mockScope.addEmployee();
expect(mockState.go).toHaveBeenCalledWith('home');
});
16. Istanbul
Yet another JS code coverage tool that computes
statement, line, function and branch coverage with
module loader hooks to transparently add coverage
when running tests. Supports all JS coverage use
cases including unit tests, server side functional tests
https://www.npmjs.com/package/istanbul
17. Istanbul-Setup
● Install karma-coverage
> sudo npm install -g karma-coverage
● Install istanbul
> sudo npm install istanbul
● Karma.conf.js
> Inside preprocessors json object add the path to your file for which you need coverage
report. E.g., preprocessors: 'app/component/add/add.ctrl.js':'coverage',
> Inside reporters add a string named 'coverage', E.g., reporters: ['progress','coverage',].
20. Contd..
● Karma.conf.js
> karma init
> Select jasmine as your testing framework
> Select browser, whichever you like
> Specify the paths to your spec files. E.g., 'app/*.js', 'test/*.js'.
> Add the location of angularjs in your karma.conf.js.
> Add the location of ngMock library in your karma.conf.js
●
Optional commands
> npm install karma --save-dev
> npm install karma-jasmine karma-chrome-launcher –save-dev
> npm install -g karma-cli
> karma start
#6: which is useful for being confident that your application works on all browsers you need to support. Karma is executed on the command line and will display the results of your tests on the command line once they have run in the browser.