Posts Tagged “Integration Testing”

Adding non-string properties using Sling Testing Tools

Recently, I was creating integration test following this article. Everything was working out nicely but then I couldn't figure out how to create anything other than a String data type in the JCR. I was specifically trying to create a Date data type. I found a nice document about the sling post servlet and Date properties. This showed the proper format for Date String but all the examples where for HTML forms. I tried formatting...

New from Apache Sling: Testing Tools 1.0.8

The Apache Sling Project just announced the release of Testing Tools 1.0.8.  This new release brings some great new features and fixes to anyone using Apache Sling Testing Tools for integration tests.  There are two fixes which are certainly worth highlighting. SLING-3328:  Simplify SlingTestBase usage with an already running instance This issue makes it easier to connect the Sling Testing Tools to a running Sling / AEM instance without requiring to set the jar.executor.jar.folder, jar.executor.jar.options,...

Follow Up to Integration Tests in Adobe CQ

In my previous post, I had introduced the idea of integrating testing AEM (CQ5) projects using Apache Sling Testing Framework.  After using the integration testing framework for a while and learning more about the framework, I have come up with some improvements to my original post. 1. Support Testing Existing AEM/CQ5 Instance This makes your tests a lot quicker and easier, instead of starting up a new CQ instance just to run your integration tests,...

Integration Tests in Adobe CQ

Awhile back I wrote a post on running integration tests in Apache Sling. This technique is useful for developers working directly on Apache Sling, but doesn't support downstream platforms like Adobe CQ/AEM.After some finagling and testing I was able to get a similar technique working using Adobe CQ / AEM instead of Apache Sling. To enable integration tests using Adobe CQ, add the following into your POM.DependenciesFirst, add plugins to copy required dependencies and the...

Creating Integration Tests in Apache Sling

One of the lesser known features in Apache Sling Testing Tools framework is the SlingTestBase, this class can be extended to allow you to create tests against a Sling instance which will be automatically created, started and then shut down when the tests are complete.Why Test this Way?First, you should have some form of automatic testing on your Apache Sling and Adobe CQ5 projects.  Automatic testing gives you better coverage against regression and changes breaking code...