All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xceptance.xlt.api.validators.StandardValidator Maven / Gradle / Ivy

Go to download

XLT (Xceptance LoadTest) is an extensive load and performance test tool developed and maintained by Xceptance.

There is a newer version: 8.1.0
Show newest version
package com.xceptance.xlt.api.validators;

import com.gargoylesoftware.htmlunit.html.HtmlPage;

/**
 * This validator groups the four most common validators into one to make the integration into the code easier.
 * 
 * @author René Schwietzke (Xceptance Software Technologies GmbH)
 */
public class StandardValidator
{
    /**
     * The most common validators grouped into one validator to simplify the integration. It will validate the following
     * aspects:
     * 
    *
  • response code,
  • *
  • content length,
  • *
  • closing HTML tag and
  • *
  • JTidy
  • *
* * @param page * the page to check */ public void validate(final HtmlPage page) throws Exception { // response code = 200? HttpResponseCodeValidator.getInstance().validate(page); // does the length match? ContentLengthValidator.getInstance().validate(page); // is the page closed with HtmlEndTagValidator.getInstance().validate(page); // use xhtml validator for a global conformity check XHTMLValidator.getInstance().validate(page); } /** * Returns the instance. * * @return the singleton instance of this validator */ public static StandardValidator getInstance() { return StandardValidator_Singleton._instance; } /** * Singleton implementation of {@link StandardValidator}. */ private static class StandardValidator_Singleton { /** * Singleton instance. */ private static final StandardValidator _instance; // static initializer (synchronized by class loader) static { _instance = new StandardValidator(); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy