The unknown spice girl. Aka NineCollective Jasmine Testing.

Slides:



Advertisements
Similar presentations
1 Storage Duration and Scope –Local and global variables Storage classes –automatic, static, external, register Todays Material.
Advertisements

1. Define the concept of assertions. 1 Explain the use of assertions. 2 Create Java program using assertions. 3 Run Java program using assertions. 4 2.
Chapter 8 Scope, Lifetime and More on Functions. Definitions Scope –The region of program code where it is legal to reference (use) an identifier Three.
Variable types We have already encountered the idea of a variable type. It is also possible to think about variables in terms of their kind, namely: 1)
Getting Started With STATA How do I do this? It probably opened automatically, but you may have to save it to the desktop, and double-click it to open.
RSpec. Testing with RSpec Test::Unit “does the job”, but it would be nice if tests would be more descriptive, more Enlgish-like RSpec uses some Ruby magic.
Demonstration of the use of browser extensions in Mozilla to link from a Google Scholar item to a European Library object.
Integrated Development Environments. Today We Will: Go over more advanced functionality of Eclipse. Break up into teams to work on presentation and final.
MC365 Application Servers: Tomcat. Today We Will: Discuss what application servers are Introduce Tomcat Download and install Tomcat Break up into teams.
E.1 Eclipse. e.2 Installing Eclipse Download the eclipse.installation.exe from the course web site to your computer and execute it. Keep the destination.
Installing Tomcat on Windows  You may find the Tomcat install shield has some problems recognizing JSDK 1.4 beta installations.  You.
Comm Operator Tutorial How to send the data after receiving specific data automatically Serial Port Tool
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
INTERNET APPLICATION DEVELOPMENT For More visit:
® IBM Software Group © 2006 IBM Corporation Programmatically Rendering and Hiding JSF Controls This section describes how to hide and show JSF controls.
1 FreeBSD Installation ISOC/AfNOG Michuki Mwangi (Original materials by Hervey Allen – NSRC)
Remote On-line Backup Service Here’s how it works...
Java Servlets example using NetBeans 6. Pre-requirements: Install Java JDK 1.6 Install NetBeans IDE 6 (we will use version NetBeans IDE update 16)
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
1.  “To write test cases for every non-trivial function or method in the module so that each test case is [as] separate from the others [as] possible.”
An Introduction to Front-end Web Development Tom Perkins.
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
JavaScript Scripting language What is Scripting ? A scripting language, script language, or extension language is a programming language.
Illustration of a Visual Basic Program Running an Ada Program 1 by Richard Conn 11 September 1999.
”Java and JMLfor Dummies” The Java source code is written in a text file using your favourite editor (Notepad) and is saved with extension.java. Be careful.
Coinage Analysis Once you have exported the “ABA” or bank file from your payroll program, open the Coinage Analysis. Click to locate file.
Simio User Code Appendix - User Code.
1 Applets are small applications that are accessed on an Internet server, transported over the internet, automatically installed and run as a part of web.
Alok Guha Unit Testing Framework for JavaScript.
1 FreeBSD Installation AFNOG Chix 2011 Blantyre, Malawi 31 st Oct - 4 th Nov 2011 Dorcas Muthoni and Evelyn Namara.
Debugging It is what you do. Debugging Where your time is spent: 1 st place: documentation 2 nd place: debugging Most valuable skill: Debugging!
GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July  Tucson, Arizona GDT Tips.
JavaScript Introduction inf385t Semantic Web 2/20/2006.
Agya Adueni. Hardware  The machine featured in this tutorial is a Dell Dimension 8200 with 512mb of RAM and a P4 1.8GHz processor.  It ran Fedora Core.
PROGRAMMING USING PYTHON LANGUAGE ASSIGNMENT 1. INSTALLATION OF RASPBERRY NOOB First prepare the SD card provided in the kit by loading an Operating System.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Your Poster Title Goes Here The University of Findlay
Python’s Modules Noah Black.
Python Lesson 12 Mr. Kalmes.
How to link a test to a launcher (in this case a shell launcher)
Session Variables and Post Back
Web Design II Flat Rock Community Schools
A Lecture for the c++ Course
C-language Lecture By B.S.S.Tejesh, S.Neeraja Asst.Prof.
Python Lesson 12 Mr. Kalmes.
REBOL Writing Functions.
Ford Library Career Tools
CS 240 – Lecture 5 Scope of Variables, The Stack, Automatic Variables, Global Variables, Constant Type.
Your Poster Title Goes Here
Variables and Their scope
Trainings 11/18 Advanced Java Things.
Class Commenting Doxygen for Classes.
Passing Parameters by value
Coding Concepts (Basics)
PHP and Forms.
Your Poster Title Goes Here The University of Findlay
Presented by : Chirag Dani & Dhaval Shah
Your Poster Title Goes Here
Your Poster Title Goes Here The University of Findlay
Your Poster Title Goes Here The University of Findlay
Functions.
HyperText Markup Language
Methods/Functions.
Functions By Anand George.
Web Programming and Design
Web Programming and Design
Redundant code repositories
Fast-Track UiPath Developer Module 11: Best Practices and Tips
Visual Studio Code Walkthrough
Presentation transcript:

The unknown spice girl. Aka NineCollective Jasmine Testing

Setting up Jasmine  In Command Prompt type InstallGems.bat

Rebuilding for test run  If you make changes to or create a new viewModel run rake asset:compress in Git Bash.  This will later be done automatically.

Run the test server  To set up the server and run the tests type rake js:server.  This will run the test server.

Getting the port number  You find the port number for localhost after you run js:server

Capturing the Browser  In your browser go to localhost:port number.  Click Capture the Browser

Captured Browser

Run the tests  Type rake js:run in a different Git Bash to run the tests.

Auto running Jasmine tests on file change  Instead of rake js:run you can do rake js:auto to run the tests automatically if you have growl installed  Must have Growl installed and running. 

Setting up a Spec  It() sets up a spec for testing.  To create a Spec you would type it(‘Meaningful Description’ function () { code to run goes inside here.})  Inside the Spec you would use expect( Item to Test ). Matcher to use.  You can disable a Spec by using xit() instead of it().

Setting up a Suite  Group your specs into suites.  To set up a Suite you use describe().  The suite set up looks like this describe( ‘Suite name’, function () { Then a call do the different Specs you will be testing }).  The Suite name will be reported when Spec is ran.  Suites are ran in the order that the describe calls are made.

Setting up a Suite (cont.)  You can call variables within a describe block that are accessible by the Specs  If you create a global variable it will not be reset between each Spec call.  To initialize a variable between each Spec use beforeEach().  Suites can be nested.  You can disable a Suite by using xdescribe() instead of describe().

Matchers  Matchers are used to test a certain outcome.  You can define your own Matchers to assert a more specific expectation.  A matcher function gets the value from this.actual.  You can pass as many arguments as you want into the function call.  It returns a Boolean value.

The way we use Jasmine  We use nested Suites to test each part.  descirbe({ Describe({ ○ Describe({ ○ })})