top
Sort by :

Take A Leap And Boost Your Career Path With Python

Python tops the charts when compared with all other programming languages for the most promising career options for technical professionals. Career opportunities are growing exceptionally worldwide for Python developers. Python is not the new player in the programming space but it has gained huge popularity in the market. It is an open-source programming language with excellent development capabilities and maximum versatility. The coding efforts are reduced specially for better testing and performance. This is the reason why Python professionals are in much demand in today’s fast-growing tech market.If you are starting your career as a Python beginner, most of the companies will generally offer you a package of INR 3 LPA - INR 5 LPA. The above infographic will give you a clear idea and help you understand the past, present and future of Python.To grab a successful job in Python you should follow a well-defined learning path always. Because of less availability, the Python developers are earning attractive incomes compared to other similar resources or skills available in the market. This is why there are plenty of institutes offering training programs in Python, but note that industry expert trainers are limited even today. You could learn Python faster and become a most demanding resource in the IT space only with the right training. If you really want to start your career in Python, start your Python training today offered by a reputed institute who could help you achieve your dreams successfully.Companies across the world are looking for highly skilled and qualified Python professionals as they believe that they are able to give a right solution as per the client requirements. Python, PHP, Ruby, C++, Java, SQL, Salesforce, Big Data Hadoop are a few skills that are expected to beat in 2018 and beyond. However, Python remains the high-level programming language gaining a competitive edge over others.Become a successful Python leader with the right skills and right Python certification!
Rated 4.5/5 based on 11 customer reviews
Take A Leap And Boost Your Career Path With Python 1050 Take A Leap And Boost Your Career Path With Python Tutorials
Susan May 05 Sep 2018
Python tops the charts when compared with all other programming languages for the most promising career options for technical professionals. Career opportunities are growing exceptionally worldwide fo...
Continue reading

A Summary of DevOps Processes and Benefits to Organizations

“DevOps is an understood set of practices and cultural values that has been proven to help organizations of all sizes improve their software release cycles, software quality, security, and ability to get rapid feedback on product development.” – 2017 State of DevOps Report, Puppet.DevOps is becoming a typical requirement for every software project team in today’s rapidly evolving world. According to Forrester Research, it is predicted that 2018 will be the year of enterprise-wide adoption of DevOps. Over the years, Facebook, Google, Amazon, and other industry giants have been implementing DevOps best practices to deliver high-quality products to their customers.DevOps experts are in huge demand with a large number of organizations transiting to DevOps environment across the globe as depicted in the infographic above. If you are really looking for a DevOps certification after knowing its importance in the market, then we can help you through your journey of acquiring DevOps certification by delivering the best certification training.
Rated 4.5/5 based on 7 customer reviews
A Summary of DevOps Processes and Benefits to Organizations

A Summary of DevOps Processes and Benefits to Organizations

Tutorials
“DevOps is an understood set of practices and cultural values that has been proven to help organizations of all sizes improve their software release cycles, software quality, security, and abili...
Continue reading

An Introduction to Progressive Web Apps (PWAs)

Mobile usage is increasing continuously and companies have now started focusing more on the development of mobile-friendly sites to ensure optimal user experience. It was the year 2015 when developers at Google created Progressive Web Apps (PWAs). At Google, I/O 2016, Alex Russell, a software engineer at Google stated that Progressive Web Apps “blur the line between web content and apps, but they keep the strengths of the web”. Developers are continuously in search of easier and conventional ways to develop and deploy apps across the web and mobile. Progressive Web Apps offer a seamless and an intuitive flexible user experience. It also made things easy for developers. Now there is no need to worry about different versions of the same code for various platforms. Getting started with Progressive Web Apps is quite easier than it seems. It is very much possible now to take an existing website and convert into a PWA. The infographic takes you on an exciting journey of understanding every aspect of Progressive Web Apps. The infographic summarizes nearly everything Progressive Web Apps entail. PWA, however, is not limited to the features and benefits detailed here. Exploring the end-to-end Progressive Web Apps spectrum requires you to delve deeper and understand the technologies behind them. Zeolearn’s comprehensive courseware can help you make the most out of these apps. Set off on your journey to a unique mobile browser experience today!  
Rated 4.0/5 based on 20 customer reviews
An Introduction to Progressive Web Apps (PWAs)

An Introduction to Progressive Web Apps (PWAs)

Tutorials
Mobile usage is increasing continuously and companies have now started focusing more on the development of mobile-friendly sites to ensure optimal user experience. It was the year 2015 when developers...
Continue reading

Writing your first machine learning code

The whole world is buzzing with artificial intelligence these days. Some people predict that it might change the way the world works into the future. For developers, it presents us with a fresh opportunity to be a part of a new paradigm shift.  I started learning AI about two months back and it has been a long road since. There are lots of developments happening in AI every day. From bots that develop their own language to an AI that can beat professional players in DOTA. From self-driving cars to computers that are better at diagnosing patients than experienced doctors. There is a lot of ground to cover.  Before we go further, we must understand that there are a lot of disciplines in AI. Some of them are easier to get into than others. Obviously, your first AI program cannot be to make a self-driving car. For beginners, it is best to start with a branch of machine learning  called supervised learning.   What is supervised learning? Easily put, supervised learning means you give a bunch of data to a computer program and it uses mathematical models to draw inferences on that data. This type of learning is used for very simple regression and classification problems, but are really handy in solving many real-world problems.  Let’s start Consider this very simple data set that I’ve prepared artificially just for the purpose of this example. This dataset follows three numbers X, Y, and Z. There exists a relationship between X, Y, and Z that we don’t know yet. Our goal in writing this program is to find this relationship. This data also contains some noise that is usually present in most real data sets.  82.95761557036997,15.49770283330364,53.746988734062285 41.831058370415896,74.6908398387234,76.91731716843984 0.45109458673243674,15.880369177717512,12.400022057356612 65.84526760369872,29.757778929447664,55.432668761221926 38.02804990326463,94.94571562617034,90.18671003364872 … and 95 more simple pairs like this. For us to understand much easier, let’s put the equation in mathematical terms- Z = a*X + b*Y  Our goal is to find a and b so that we can use any other pairs of X and Y to calculate Z. Such kinds of problems are solved by a mathematical technique called linear regression.  It is one of the most simple applications of Machine Learning and easiest to get into. Before we get into the more difficult aspects of machine learning, later on, it is important to understand that this exercise is very helpful to build up confidence in this field. After all, bigger battles are won with the confidence of smaller victories.  Applications of linear regression.  These values of X, Y and Z can represent anything. They can be any three variables that are related by a linear equation. For example, if you remember high school kinematics, the velocity of any given object at a given time when it starts from an initial velocity under the influence of gravity is given by the equation v(t) = u + At where A is a constant gravitational acceleration that we don’t know. If we get a lot of experimental values for u, v and t, running a simple multivariate linear regression over these values can give us the coefficient values of u and t. We will find after our analysis that the coefficient of u will come out to be 1. If our data is to be accurate, we will get the value of A as 9.8 meters per second squared.  While this is just one area I have used for illustration, it is important to understand that linear relationships occur everywhere in nature. Getting into the code We will use Javascript to write this simple regression program by using an npm module called smr.  To set up the project, you must have nodejs installed. We could have used python as well, but installing and working with Scipy is not in our scope for now. We’ll gradually go there with time. For the time being,  Start by creating an empty directory for your project  Install smr by using npm install smr.  Create a new file called index.js and put in the code.  The code is as follows:  var smr = require('smr'); var regression = new smr.Regression({ numX: 2, numY: 1 }) //read all the data by creating a read stream var lineReader = require('readline').createInterface({   input: require('fs').createReadStream('data.txt') }); //read it line by line and fit it into the regression object lineReader.on('line', function (line) {     line = line.split(',')     regression.push({x:[line[0],line[1]], y:[line[2]]})     t = regression.calculateCoefficients()     console.log(t) }); You can get the dataset from this GitHub repo that I’ve created for this code at the end of this article.  Running the code We run the code by using node index.js on the same directory as the code. Before we do that, let’s remember the data is in the form z = a*X + b*Y  The code fits the data into the regression object and prints coefficient values of a and b. When we run the code, we begin to see this output.  [ [ 0.5007233183107977 ], [ 0.7496919531492985 ] ] [ [ 0.5007720353300695 ], [ 0.749708917362593 ] ] [ [ 0.500762395739748 ], [ 0.7497046748655358 ] ] [ [ 0.5007149604193888 ], [ 0.7496660120512422 ] ] [ [ 0.5009035966316537 ], [ 0.7495249465185432 ] ] The value of a begins to converge at 0.50 and the value of y begins to converge at 0.75. This is remarkable, as when you see the repo there is a quick python script that is used to prepare the data. The value of a and b that I had chosen were indeed 0.50 and 0.75. That means our model is good and we have successfully created our first machine learning program.  Link of repo: https://github.com/archimedes14/linear_regression_simple  
Rated 4.0/5 based on 20 customer reviews
Writing your first machine learning code

Writing your first machine learning code

Tutorials
The whole world is buzzing with artificial intelligence these days. Some people predict that it might change the way the world works into the future. For developers, it presents us with a fresh opport...
Continue reading

The Journey With Angular

Since its origin, Angular 4 has attained a series of milestones with each update. These transformations have changed the face of Web Development altogether. In the current date, Angular 4 has the rightly customized features, that meet the requirements of the developers and the end users. It was the year 2009 when Angular first appeared in front of the developers community. It was developed as a side project by two developers, Misko Hevery and Adam Abrons. AngularJS was developed with the vision of an end-to-end tool for web designers to interact with both frontend and backend. It's 2017, Angular latest version 4 has already arrived and has changed a lot. Let’s have a look at the entire journey of Angular.    Wear your Angular armour, fuel your spaceship with all that is new, and plunge headlong into the Web Development space. Be ready to be the next Angular astronaut! To cover the breadth of Angular 4 concepts, you may explore ZeoLearn’s Instructor-led online training sessions and also access Angular 4 course materials. This will keep you abreast with the transforming web-development landscape.
Rated 4.0/5 based on 20 customer reviews
The Journey With Angular

The Journey With Angular

Tutorials
Since its origin, Angular 4 has attained a series of milestones with each update. These transformations have changed the face of Web Development altogether. In the current date, Angular 4 has the righ...
Continue reading

Infographic: A journey into the JavaScript world

It’s been around 20 years for JavaScript and since then it has become a common choice for web developers. The entire ecosystem of web development is now supported by different JavaScript frameworks. Along with HTML and CSS, JavaScript is one of the important core technologies which majority of websites employ.  It took Brendan Eich only 10 days to invent JavaScript. As easy as it might seem, learning JavaScript might not be a piece of cake! So why be the lazy Garfield when you can buckle up and take the baby steps!  The infographic will help you in understanding all the different stages of learning JavaScript. The above steps can definitely render a cursory acquaintance with the basics of JavaScript. This, however, may not suffice if you intend to build a strong foundation. To explore the concepts better, you may attend the online Instructor-led training sessions offered by Zeolearn and avail related course materials. This will help you grow at an equal pace with the fast-evolving world of web development.
Rated 4.0/5 based on 20 customer reviews
Infographic: A journey into the JavaScript world

Infographic: A journey into the JavaScript world

Tutorials
It’s been around 20 years for JavaScript and since then it has become a common choice for web developers. The entire ecosystem of web development is now supported by different JavaScript framewo...
Continue reading

JavaScript Tutorial For Beginners

  JavaScript is one of the world’s most popular programming languages and It is into every corner of the development. Days of javascript being just simple web scripting language are gone, Today Javascript is super powered language that is used in wide variety of software development like web, server-side, mobile, microcontroller etc., JavaScript is certainly the backbone of a website development and is used by all big players and lot of large websites frontend and backend are powered by it. It’s been around 20 years for JavaScript. In these years it has got several names such as Mocha, LiveScript, JScript, and ECMAScript. STEP 1: Learn JavaScript Building blocks (Beginner) As with any language, let it be speaking the language or computer language building blocks are very much needed to start our journey with its use. Javascript is no exception. So the first and foremost step is to learn the basics which comprise of the character set, keywords, data types, operators, conditionals, loops. So look at the links given below and start learning the basic building blocks. http://www.w3schools.com/js/default.asp https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics STEP 2: Learn JavaScript Objects & jQuery (Intermediate) Knowing basics is good but going deep into the language is better. Be better javascript developer by enhancing the knowledge of basics to next level. Objects are first class citizens in javascript and they are ubiquitous, so know more about them. It always good to know about great libraries which make developer life easy, without a doubt jQuery is one great library to learn and it helps in boosting developer productivity to a greater extent. There are tons of websites which are powered by jQuery. The following link gives you a clear picture about jquery and JavaScript objects.  https://code.tutsplus.com/tutorials/the-basics-of-object-oriented-javascript--net-7670 http://learn.shayhowe.com/advanced-html-css/jquery/ STEP 3: Build Your First Interactive Website (Intermediate) Learning is always good but the application of knowledge gained is fantastic. Time to showcase the skill earned. Build a website on your own. Learn how to present your web page with fancy effects by creating a live one. https://www.codecademy.com/skills/make-an-interactive-website https://www.khanacademy.org/computing/computer-programming/html-css-js STEP 4: Knowing What are Variable Scope, and Hoisting (Advanced) Good, better, best. Be the best. Delve deep into the language and be a master. Want to know what makes an application alive then learn in deep by following the below link. https://rainsoft.io/javascript-hoisting-in-details/ https://medium.com/@naveenkarippai/scoping-and-hoisting-in-javascript-2c2e82107427#.5ke61zcuw STEP 5: Understand JavaScript Date, Timers, and Cookies (Advanced) Everyone knows the tracker agent cookies, isn’t it? Learn more about timers and javascript date from the given links below http://www.techotopia.com/index.php/Understanding_JavaScript_Cookies http://www.elated.com/articles/javascript-and-cookies/ STEP 6: Build JavaScript Application in Real-World (Advanced) A real world example is any day better for more understanding. So here would be taught to create real-time applications. https://www.codeproject.com/Articles/584519/Beginners-Guide-Creating-Web-Applications-with-Jav http://www.awwwards.com/build-a-simple-javascript-app-the-mvc-way.html STEP 7: Testing Time - Quizzes (Advanced) Practice makes a man perfect...Well, it goes with the saying learning is incomplete without testing. So test yourself and make yourself better. http://www.javatpoint.com/javascript-quiz http://www.asmarterwaytolearn.com/js/index-of-exercises.html http://study.com/academy/lesson/what-is-javascript-function-uses-quiz.html#courseInfo    
Rated 4.0/5 based on 20 customer reviews
JavaScript Tutorial For Beginners

JavaScript Tutorial For Beginners

Tutorials
  JavaScript is one of the world’s most popular programming languages and It is into every corner of the development. Days of javascript being just simple web scripting language are gone...
Continue reading

Roadmap for learning HTML and CSS

HTML and CSS are two of the most important support wheels which helps any amateur developer to learn web development. Therefore, to have a smooth ride in rest of the web development journey developers should start with HTML and CSS. The infographic shows all the different stages in process of learning the language. We have collected some useful links which will help the developer to learn the basics of HTML and CSS.  
Rated 4.0/5 based on 20 customer reviews
Roadmap for learning HTML and CSS

Roadmap for learning HTML and CSS

Tutorials
HTML and CSS are two of the most important support wheels which helps any amateur developer to learn web development. Therefore, to have a smooth ride in rest of the web development journey developers...
Continue reading

[UPDATED] HTML and CSS Resources - Stepping Stones Of Web Development

  Learning HTML and CSS is the first step towards starting with web development. Web development is the arena where learners can explore as deep as they can. To begin learning process learners should have the idea about what they are going to learn. The right choice of resources and approach will take you towards mastering the languages. Just for beginners, we have aggregated some of the reliable resources which will help them in understanding the basics. Htmldog: Beginner Guide for HTML - http://htmldog.com/guides/html/beginner/ Htmldog: CSS Guide - http://htmldog.com/guides/css/ Tutorialspoint: Beginning with HTML -https://www.tutorialspoint.com/html/index.htm Tutorialspoint: CSS Basics - https://www.tutorialspoint.com/css/ Sitepoint: HTML Basics - http://reference.sitepoint.com/html Sitepoint: CSS Basics - http://reference.sitepoint.com/css Beginners Guide on HTML & CSS - http://blog.experts-exchange.com/ee-blog/beginners-guide-to-html-and-css/ Absolute Beginners Guide on HTML & CSS - https://www.netregistry.com.au/blog/html-and-css-an-absolute-beginners-guide/ Web Designing with HTML & CSS - http://www.instructables.com/id/Web-Designing-Basics-HTML-and-CSS/ Siteground: CSS Basics - https://www.siteground.com/tutorials/cssbasics/ Basics of HTML: http://html.net/tutorials/html/ HTML Fundamentals: http://html.com/ CSS Basics: http://html.net/tutorials/css/ PDF on HTML & CSS Basics Video Tutorials on HTML & CSS HTML basics video tutorial. CSS basics video tutorial Basics of HTML & CSS video tutorial. https://code.tutsplus.com/tutorials/css-noob-to-ninja--net-12186 Responsive Web Design video tutorial http://www.pvtuts.com/html/html-introduction Along with the materials provided, it is required for the beginners to have a proper guidance to learn web development. Zeolearn provides proper Instructor-Led live online training sessions for developers through which beginners can get in-depth knowledge about the technologies. Last Updated On 13/06/2017
Rated 4.0/5 based on 20 customer reviews
[UPDATED] HTML and CSS Resources - Stepping Stones Of Web Development

[UPDATED] HTML and CSS Resources - Stepping Stones Of Web Development

Tutorials
  Learning HTML and CSS is the first step towards starting with web development. Web development is the arena where learners can explore as deep as they can. To begin learning process learners...
Continue reading

HTML and CSS Concepts - Basics for Beginners

Learning Web Development has never been so easy. Understanding the concepts of Web Development from its roots is the most important thing. It is a widely accepted concept that HTML & CSS are the nuclei of Web Development. We provide you with most reliable resources for you to understand right from the basics to the advanced levels of HTML & CSS. Step 1 - Learn Basics of HTML and CSS (Beginner) This material gives you enough exposure to the basics of HTML and CSS. For personal assessment, you can try quizzes. Enough examples are there to practice, and you can also experiment with the codes in its editor. http://www.w3schools.com/html/default.asp http://www.w3schools.com/css/ Step 2 - Learn by Doing (Beginner) Want to experience learn by coding? then code academy is your choice https://www.codecademy.com/learn/web Step 3 - Understand HTML Layouts (Advanced) Building a home and building a well-planned home are two different things, now we have the good foundational strength we are now ready to become creators, designers what not !!!. This article helps you find the techniques to create beautiful layouts. Layout plays a very critical role for any website. https://www.codementor.io/css/tutorial/4-different-layout-techniques-create-single-page http://learnlayout.com/ Step 4 - Understand HTML Forms (Advanced) It's very important that you don't test the patience of user when asking input, so forms are very important for any web application. Sign Up, login, feedback, Comments.. all needs to be presented to the user with clear and concise style. Go and play with forms. Don't forget !!! - Practice makes man perfect http://learn.shayhowe.com/html-css/building-forms/ http://www.javascript-coder.com/html-form/html-form-tutorial-p1.phtml Step 5 - Understand CSS Positioning (Advanced) Clean home has things rightly placed - interior designing !!!, when building website elements positioning is very important and needs special attention. No ESCAPE from coding.. code it .. learn it.. https://www.codecademy.com/courses/advanced-css-positioning/0/1 http://learn.shayhowe.com/advanced-html-css/detailed-css-positioning/ Step 6 - Build a project using HTML and CSS (Intermediate) Practice more by building a project - http://www.theodinproject.com/courses/web-development-101/lessons/html-css Step 7 - Learn about Responsive (Intermediate) Mobile, Tablet, Desktop - devices with multiple screen sizes. Ahhhh.. my site works only on the desktop, Do I need to build separate sites for mobile and tablet. Wait Wait Wait !!! We have a responsive web design concepts.. go explore them and get your website flexible to work on any device http://www.w3schools.com/css/css_rwd_grid.asp Step 8 - Best Practices (Advanced) When you write codes you don’t want to make any mistakes. To write clean and error free codes it is required to follow some procedures that are accepted by the developers worldwide. Here are some resources to write proper codes without any errors. http://learn.shayhowe.com/html-css/writing-your-best-code/ https://code.tutsplus.com/tutorials/30-css-best-practices-for-beginners--net-6741   Step 9 - Testing time - Assignments (Shortcut to Success) Learning doesn’t work when you have not tested what you learned. To make your HTML & CSS learning fruitful you should test yourself with some assignments. Here are some assignments for you to practice. http://www.landofcode.com/html-exercises/ http://www.landofcode.com/css-examples/ Step 10 - Additional Resources HTML and CSS Resources - Stepping Stones Of Web Development
Rated 4.0/5 based on 20 customer reviews
HTML and CSS Concepts - Basics for Beginners

HTML and CSS Concepts - Basics for Beginners

Tutorials
Learning Web Development has never been so easy. Understanding the concepts of Web Development from its roots is the most important thing. It is a widely accepted concept that HTML & CSS are the n...
Continue reading

E2E testing with protractor in AngularJS

Unit testing is good, but not obviously enough. Programmers need to tests how their app behaves eventually when small units are assembled into what is known as a complete product. This is where end-to-end testing comes into picture.  E2E testing is about checking the integrity, behavior and flow of your complete application. It is a way to ensure that when your users use your app, they do not run into bugs or defects (For eg: a broken link). e2e testing can be done manually, but here we will see how we can automate e2e tests for our AngularJS applications using a tool known as Protractor and in doing so, we will programmatically replicate user behavior on our application. Protractor Protractor is an e2e testing framework for AngularJS applications. Protractor is a Node.js program and uses webdriver-manager to interact with the browser and replicate user actions. It uses Jasmine for its testing syntax. Protractor provides AngularJS specific locator-strategies which makes it the framework of choice for performing e2e tests on AngularJS applications. Setup Protractor requires node.js to run. So make sure you have node installed. Protractor 3 is compatible with node v4 and above, for lower versions of node use proractor@2. We will require a standalone selenium server to interact with the browsers,which requires Java Development Kit to be installed on our machine. After java installation in some cases, you might have to restart your machine for java to be available as an environment variable. We can verify this by running $ java -version in command line. Install Protractor Globally Install protractor globally by running $ npm install protractor -g. Note:  In windows, you may need to fire up the cmd window with administrator privileges and for Linux, sudo access might be required. This command will install protractor and webdriver-manager and make them available in command-line. To ensure if protractor was successfully installed run $ protractor --version. Next update your webdriver-manager by running $ webdriver-manager update Our App Our app is a simple one view todo app which lets user type-in a todo and add it to the list of todos. Since this is a simple demo app, we are following a simple flat directory structure. Here are the files. Index.html                              Todo App                                                                                        Zeolearn Todo App                                                 Todo List                                                                                                 {{item}}                                                                                                                                 Add todo                                                                                                                            Add                                                                                                        App.js angular.module('zeolearn', []) .controller('TodoCtrl', [function(){ var vm = this; vm.items = [  'Read book- How google works', 'Renew car insurance'      ]    vm.addTodo = function(item){    vm.items.push(item);    vm.newItem = "";      }}]);Make sure you run the app on a local server. You create a simple node server or simply use xampp.Protractor Configuration Now create a file named protractor.conf.js. This will be our protractor configuration file. Here we can configure our browsers to test with our framework of choice and other configurable items. Our protractor.conf.js looks like below. Protractor.conf.js // protractor.conf.jsexports.config = {framework: 'jasmine',   seleniumAddress: 'http://127.0.0.1:4444/wd/hub',specs: ['specs.js'],  jasmineNodeOpts: {     showColors: true, // Use colors in the command line report.},  capabilities: {   browserName: 'chrome'  }} Notice under specs we have specified a file as specs.js, this is where we will be writing our tests. The seleniumAddress is the url to the selenium server. Capabilities define the browsers on which you want to run the tests. We can add multiple browser capabilities using the multiCapabilities option in the below format. multiCapabilities: [{  'browserName': 'firefox' }, {   'browserName': 'chrome'}] Writing Tests Now that we have our machine configured for e2e tests with protractor let’s create a spec.js file and write a few tests. We are using jasmine for our testing syntax. Protractor also has partial support for mocha. The reason for choosing jasmine is that it is the default framework for writing e2e as well as unit tests in AngularJS. To begin with, we will write a very basic test that will access our app and verify our app title. Specs.js describe('Protractor Demo App', function() { /** This block runs before each it block */        beforeEach(function() {        browser.get('http://localhost/zeolearning/e2eprotractor'); //fetch your app replace the above by your apps url  });         it('should have a title', function() {          expect(browser.getTitle()).toEqual('Todo App');});}); Your tests can be divided into different describe blocks. As a good practice, you can have one describe block for one component or view of your app, although this is not necessary. The before each block contains all the things we need to do prior to running each spec. A spec in jasmine is an it block.  So here, we are fetching our app using the browser.get function provided by protractor. Later we have added one spec where we have an expectation that checks the title of our app. Running tests Now that we have our first test ready let’s run the test to see what happens.  Before doing so we need to have our selenium server running. Open up another window of your command line tool and start the selenium server by running $ webdriver-manager start To run the tests run $ protractor . So in our case, we can run by $ protractor protractor.conf.js On doing so you will notice browser windows opening up and closing. This is done by selenium, where it’s actually replicating the user behavior. After the tests are complete you should get the following output. Writing more tests Now that we successfully ran our first test. Let’s go ahead and add more specs, to test our complete app. Specs.js describe('Protractor Demo App', function(){ var items;  var count; /** This block runs before each it block */ beforeEach(function() {browser.get('http://localhost/zeolearning/e2eprotractor'); //fetch your app items = element.all(by.exactRepeater('item in todo.items'));items.count().then(function(originalCount){  //resolve initial count of the listcount = originalCount;   }); });it('should have a title', function() {expect(browser.getTitle()).toEqual('Todo App');}); /** The tests in the below it block can be skipped */  it('should have all required elements present', function(){  expect(element(by.exactRepeater('item in todo.items')).isPresent()).toBe(true); //if list presentexpect(element(by.model('todo.newItem')).isPresent()).toBe(true); // if model -input box presentexpect(element(by.buttonText('Add')).isPresent()).toBe(true); // if button present });  it('should have 2 todos initially', function(){ //checking no of items in list initially expect(count).toEqual(2); });  it('should add a todo', function(){  var newTodo = 'Complete my assignment';   element(by.model('todo.newItem')).sendKeys(newTodo);  // Typing in a todo  element(by.buttonText('Add')).click();  // clicking the add button  var list = element.all(by.exactRepeater('item in todo.items'));// get our todo list expect(list.count()).toBe(count + 1);// check if count increasesexpect(list.getText()).toContain(newTodo);// check if the newTodo is present });});  Below are the specs we have added. ●     should have all required elements present: Here we are checking if all the HTML elements required are present and rendered. ●     should have 2 todos initially: Here we verify the initial number of items in the todo list. ●     should add a todo: Here we make protractor add a new todo where it literally goes in and types into the text box, then clicks the add button just           like a user would. It also verifies if the todo was added successfully. Please read the comments inline along with the code for a functional explanation. Upon running the test using $ protractor protractor.conf.js we should get the below output. Conclusion At first, writing e2e tests might look time-consuming, but as your app starts to scale and grows in complexity, manually testing becomes cumbersome and inefficient. By automating e2e tests you only have to invest once and then perform tests any number of times. Automated e2e tests at later stages saves a huge amount of time and is more reliable than manual testing. Protractor, is the de-facto tool for e2e testing of AngularJS applications. In this tutorial, we learned how we can setup our machine and perform e2e testing on our AngularJS applications using protractor. References Protractor api: http://www.protractortest.org/#/api Jasmine: http://jasmine.github.io/2.0/introduction.html  
Rated 4.0/5 based on 20 customer reviews
E2E testing with protractor in AngularJS

E2E testing with protractor in AngularJS

Tutorials
Unit testing is good, but not obviously enough. Programmers need to tests how their app behaves eventually when small units are assembled into what is known as a complete product. This is where end-to...
Continue reading