background preloader

Code testing

Facebook Twitter

Load Testing by Example - Best Practices - Web Performance. Overview The purpose of this tutorial is to present some of the best practices we have developed at Web Performance.

Load Testing by Example - Best Practices - Web Performance

Through our Load Tester product development and load testing service experiences, we have found some easy tips and general strategies that can help make load testing efforts more successful. They are presented here in hopes of making all load testing efforts more successful. General Strategies As a tester, our job is to provide the best possible feedback on the readiness of an application as early as possible in the development cycle. 1. Testing.

Automating JMeter tests with Maven and Jenkins. In this post, I will show how to integrate the popular load testing tool JMeter in a Maven build.

Automating JMeter tests with Maven and Jenkins

The goal is to allow every developer to easily develop and execute JMeter tests on his local machine. There will be no need to learn a new commandline utility or to install separate tools. Everything will be possible via some simple maven goals. With this setup, it is also easy to create a Jenkins job, that allows execution of JMeter tests against a testing environment with a single click. TestCafé: Web Testing Framework.

Software metrics

Testing Web Applications with Spring Framework 3.2. Sam Brannen Swiftmind Rossen Stoyanchev.

Testing Web Applications with Spring Framework 3.2

Introducing Spring MVC test framework. Spring MVC comes with a very useful test framework, which allows doing in-depth testing without even starting a web container.

Introducing Spring MVC test framework

If you struggle maintaining any application based on Spring MVC, this post will show you the basics of the Spring MVC test framework. What am I testing? We can distinguish 3 levels of testing for Spring MVC controllers: unit tests: we test only the logic of the controller. Dependencies are mocked/stubbed, there's no Spring, nor web container. The Future of Web MVC Testing. Ok, ok, I'm excited.

The Future of Web MVC Testing

Right now I just was able to hack my way through a test with Spring 3.2 and the web context. Does Spring MVC Spring 3.2 test the web.xml configuration. » Maven + JUnit + ClassFormatError: Absent Code attribute in method that is not native or abstract in class file 11May 2010 Once in a while one stumbles upon an error message like this java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/mail/Session This happens if your code compiles against incomplete classes, like the JavaEE6 Api and your Unit tests try to access code thats not there.

» Maven + JUnit + ClassFormatError: Absent Code attribute in method that is not native or abstract in class file

JUnit will simply fail and mark the test as error, printing something like this Tests in error: initializationError(com.dominikdorn.dc.passwordReset.SimplePasswordResetServiceTest) Spring Framework 3.2 RC1: New Testing Features. As Juergen Hoeller mentioned in his post announcing the release of Spring Framework 3.2 RC1, the Spring Team has introduced some exciting new features in terms of testing support.

Spring Framework 3.2 RC1: New Testing Features

Most importantly, we've added first-class support for testing web applications. [1] Please note: this is a cross post from my Swiftmind company blog. In this post we'll first take a look at some of the general new testing features in the Spring Framework, and then we'll go into detail regarding support for testing with a WebApplicationContext as well as request and session scoped beans. We'll close with a look at support for ApplicationContextInitializers and a brief discussion of the road map for testing with application context hierarchies. Rossen Stoyanchev will later follow up with a detailed post on the new Spring MVC Test framework that provides first-class support for testing Spring MVC applications.

Build and Dependencies Generic Factory Methods Mock Objects. Spring Framework 3.2 RC1: Spring MVC Test Framework. Last week Juergen Hoeller announced the release of Spring Framework 3.2 RC1 and Sam Brannen discussed exciting additions in its spring-test module such as support for WebApplicationContext's and upcoming plans for loading a hierarchy of contexts.

Spring Framework 3.2 RC1: Spring MVC Test Framework

Java: Is assertEquals(String, String) reliable. Java - AssertContains on strings in jUnit. Using HSQLDB to unit test database access code. Writing unit tests for code that accesses the database is a recurring challenge for Java developers.

Using HSQLDB to unit test database access code

This post will describe a technique we’ve used successfully on a number of database-intensive projects: using HSQLDB as an in-memory database so that the database access code can be thoroughly tested without dependencies on external resources. First a description of our environment: our production databases are Oracle. Performance vs. load vs. stress testing. Here's a good interview question for a tester: how do you define performance/load/stress testing?

Performance vs. load vs. stress testing

Many times people use these terms interchangeably, but they have in fact quite different meanings. This post is a quick review of these concepts, based on my own experience, but also using definitions from testing literature -- in particular: "Testing computer software" by Kaner et al, "Software testing techniques" by Loveland et al, and "Testing applications on the Web" by Nguyen et al. Update July 7th, 2005. Integration testing. Purpose[edit] The purpose of integration testing is to verify functional, performance, and reliability requirements placed on major design items. These "design items", i.e. assemblages (or groups of units), are exercised through their interfaces using black box testing, success and error cases being simulated via appropriate parameter and data inputs.

Simulated usage of shared data areas and inter-process communication is tested and individual subsystems are exercised through their input interface. Test cases are constructed to test whether all the components within assemblages interact correctly, for example across procedure calls or process activations, and this is done after testing individual modules, i.e. unit testing. The overall idea is a "building block" approach, in which verified assemblages are added to a verified base which is then used to support the integration testing of further assemblages. Big Bang[edit] Selenium Test Automation with Maven. Today i want to help you manage your Automated GUI Tests (Selenium) better.

In the past i have seen many different ways people handle this. Some people just write those plain HTML TestCases with Selenium-IDE, store it somewhere on the HDD and run manually when needed. Seleniumworks. ChromeDriver - selenium. Download chromedriver Developed in collaboration with the Chromium team, the ChromeDriver is a standalone server which implements WebDriver's wire protocol. The ChromeDriver consists of three separate pieces. There is the browser itself ("chrome"), the language bindings provided by the Selenium project ("the driver") and an executable downloaded from the Chromium project which acts as a bridge between "chrome" and the "driver". This executable is called "chromedriver", but we'll try and refer to it as the "server" in this page to reduce confusion.

Requirements The server expects you to have Chrome installed in the default location for each system: 1 For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary. Getting Started Read ChromeDriver user documentation. Selenium Maven Plugin - Introduction. Provides support for using Selenium with Maven 2. Use this plugin to start a Selenium Remote Control server to support automated web-application testing.

This plugin is intended to support usage of the Selenium Java Client Driver when running regular Surefire tests. Use Selenium IDE to help generate the initial Java code for the tests, and then augment as needed. Usage Instructions on how to use the Selenium Maven Plugin can be found on the usage page. Automated Web Testing with Selenium IDE. Automated Web Testing with Selenium IDE by Eli Weinstock-Herman (tarwn) on October 26, 2011 in category UI Development. Article views: 17,882 Instapaper How long does it take to browse through a website after each build and make sure none of the pages have mysteriously blown up? 5 Minutes? Effective out-of-container Integration Testing - 4Developers. Integration testing your Spring 3 & JPA 2.0 application. Integration testing with Spring and Jetty. Det här domännamnet är köpt och parkerat av en kund till oss. Om du vill ta reda på den publika ägar- och kontaktinformationen kan du använda tjänsten LoopiaWHOIS.

Vid registrering av domännamn hos oss ingår tjänsten LoopiaDomän helt utan kostnad. För ytterligare information om vår domäntjänst LoopiaDNS, vänligen besök vår hemsida på adressen I LoopiaDNS ingår nedanstående tjänster: JBoss Java EE Spec Artifact. When running a test suite that includes Arquillian test cases, you may be encountering the following exception: Unitils. Unitils is an open source library aimed at making unit and integration testing easy and maintainable. It is divided into several modules, each of them providing extra support for a certain aspect of your unit and integration tests. UsesOfHamcrest - hamcrest - How people are using Hamcrest matchers - Hamcrest - library of matchers for building test expressions. JValidation JValidations is a framework to express and exercise validation rules for java objects.

Its defining characteristics are: validation is performed by the objects themselves, not in external "validator" classes, preserving encapsulation; validation rules are expressed in declarative java using Hamcrest matchers, not in XML or annotations or what have you; how a validation failure is handled is entirely up to the caller through the use of callback interfaces; extensible in that custom validations can be coded, and the DSL syntax can be modified to suit your needs Window Licker.

Shazam/shazamcrest. On the subtle uses of Hamcrest tests. Posted by johnsmart on April 1, 2008 at 7:41 PM PDT I came across an interesting issue with the Hamcrest asserts today. I have a method that returns a list of domain objects, as shown here: List<Stakeholder> stakeholders = stakeholderManager.findByName("Telecom"); JUnit 4 Showcase – assertThat and Hamcrest Matchers. Surely assertEquals() can get you far but you will be amazed with the versatility of assertThat() combined with the expressive and human friendly Matchers of the Hamcrest library.

The needed static imports in your JUnit 4 test case: You could use the is() and not() matchers like so: or equalTo(): or anyOf(): jUnit ReleaseNotes4.4. Summary of Changes in version 4.5 Categories. Fest-assert-2.x Wiki. Tips and tricks · Fest-assert-2.x Wiki. (to main page) Here's some tips we are using to make writing tests easier and more elegant.Please share your tips with us, this page can be edited by everybody !

Unit testing. In computer programming, unit testing is a method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures are tested to determine if they are fit for use.[1] Intuitively, one can view a unit as the smallest testable part of an application. In procedural programming, a unit could be an entire module, but it is more commonly an individual function or procedure. Writing Your First Unit Test. Writing good unit tests, Part 1: Follow your GUTs.

Three rules for writing good unit tests. Unit Testing Best Practices. What your tests don't need to know will hurt you - The Code Whisperer. The Code Sheriff. You Shall Not Test Methods. Embrace Unit Testing.