Posts

Showing posts with the label Testing

Spring Tutorial: Creating a Hello World REST API Using Spring Framework and Spring Boot

Image
Spring Framework was created as a result of disappointment of Java community with earlier versions of Enterprise Java. Since then it has grown into huge ecosystem that allows one to solve every problem in building a Web-based Java application and more. Spring is often criticized because it used to rely on XML for configuration purposes. As a response to that the Spring Boot framework was released, which relies on convention over configuration principle and can do without XML at all. In this tutorial series we’ll go over how to create an application using Spring Framework and Spring Boot. While Spring Boot allows one to create an application faster, Spring is widely used today in enterprise environment and even by startups, so knowing Spring is definitely a marketable skill, and also learning it can provide one with the insight how Spring Boot works. The code for a simple Spring Framework application can be found here and the Spring Boot version here . Creating Spring W...

AngularJS Tutorial: Unit Testing Angular Applications Using Jasmine and Karma

Image
In the previous installment of this series we’ve learned how to perform End-to-End application testing using Jasmine and Protractor. In this part, we’ll discuss how to test controllers and how to automate this process. In fact, running tests manually may make the whole process tedious and may prompt one not to use tests altogether, so we’ll learn how to make test run in background and restart when you save your code. Adding Karma to AngularJS project As a first step, we’ll add test automation to our project. To streamline testing of Angular applications, Google created a special test automation framework called Karma which in turn can rely on various testing frameworks such as Jasmine and run tests any time you save a file in your project. To add Karma and other tools necessary for testing to the project it is necessary to execute the following command. npm install karma karma-jasmine karma-chrome-launcher jasmine-core angular-mocks --save-dev We added several de...

AngularJS Tutorial: Introduction to End-to-End Testing of AngularJS Applications using Jasmine and Protractor

Introduction to software testing In the previous installment of this series we discussed how to create a simple Hello World application using AngularJS. In this tutorial you will start learning how to streamline the development process and would tools Angular offers to the developers. When project is under active development, new features are often added to it and some previously created features are modified. It is possible that some application functionality is broken in the process. To prevent this from happening, it is a good idea to check how all the functionality works after modifications but that could be difficult because one should remember all the cases for all the features added since the beginning. Also, it’s tedious to manually place your application into various conditions and see if it works, so one can rely on automation, that is one can record all the tests in a format that computers can understand and delegate the menial task of testing to a computer. Ch...