Shared info of IoT & Cloud, Banking, Angular Wicket, Spring Microservices, BigData, flutter, E-comm, Java Telecomm and More

Showing posts with label TESTS. Show all posts
Showing posts with label TESTS. Show all posts

Monday, April 11, 2016

Selenium in Juzu portlets

The JuZcret application is now finished, but our project is not perfect
All through the previous blog posts, we have neglected to tell you about Unit Test, and this certainly is not a good practice.
The reason is that we wanted to keep you focused on a specific topic during each step. That’s why it’s only during this last step that we’ll talk about Unit Test in Juzu.
The good news is that Juzu allows you to leverage Selenium easily to simulate a real application while taking advantage of the speed of JUnit.
So it’s time to write Unit Test for our JuZcret portlet. The portlet will be deployed to an embedded portlet container. Selenium WebDriver will help to simulate almost all user interactions with the application, and then Arquillian will help to integrate with JUnit.

Monday, April 4, 2016

Downloading TestNG

Maven
<repositories>
  <repository>
    <id>central</id>
    <name>bintray</name>
    <url>http://jcenter.bintray.com</url>
  </repository>
</repositories>

<dependency>
  <groupId>org.testng</groupId>
  <artifactId>testng</artifactId>
  <version>6.9.10</version>
  <scope>test</scope>
</dependency>

Sunday, April 3, 2016

Unit and UI Testing in Android Studio

1Overview

In this codelab, you'll learn how to set up your project in Android Studio for testing, write a Unit Test and run it locally on your development machine and also how to do functional UI testing on the device.

What you’ll learn

  • Updating the Gradle build files to include JUnit and the Android Testing Support Library
  • Writing Unit Tests which run on the Java VM on your local machine
  • Writing Espresso tests which run on the device or emulator

Saturday, April 2, 2016

Unit tests with Mockito - Starter

1. Unit Testing & test doubles

1.1. Target & challenge of unit testing

A unit test is a test related to a single responsibility of a single class, often referred to as the System Under Test (SUT). A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. The achievement of this desired goal is typical complicated by the fact that Java classes usually depend on other classes. Test doubles will solve this.

Thursday, March 24, 2016

Android Testing Concepts and Types

Test Structure


Android testing is based on JUnit. In general, a JUnit test is a method whose statements test a part of the application. You organize test methods into classes called test cases. You can further organize these classes into test suites.
In JUnit, you build one or more test classes and use a test runner to execute them. In Android, you use Android Studio (or the Android Plugin for Gradle) to build one or more test source files into an Android test app.
From your testing environment, you can run your test in one of the following ways:
  • On your local machine: Compile the test classes and execute them locally on the Java Virtual Machine (JVM) using the JUnit test runner.
  • On a device or emulator: Install the test app and the app under test to a physical device or emulator, and then execute your tests using an Android-specific test runner (such as AndroidJUnitRunner).

Wednesday, March 23, 2016

Android Testing Framework

Overview

Google provides an Android Testing framework that is part of the Android SDK and is built on top of standard JUnit testing extended with a instrumentation framework and Android-specific testing classes.
Note: You must be running at least version 1.1.0 of the Android plug-in for Gradle, since unit testing with Android Studio was only recently supported. More information can be found here.

Unit Testing with JUnit

1. Testing terminology

1.1. What are software tests?

A software test is a piece of software, which executes another pierce of software and validates if that code results in the expected state (state testing) or executes the expected sequence of events (behavior testing).                                   

1.2. Code (or application) under test

The code which is tested is typically called the code under test. If you are testing an application, this is called the application under test.

Popular Posts

Blog Archive