Giter Club home page Giter Club logo

page-content-tester's Introduction

Introduction

Dperectated: use skrape{it} instead

Paco is a Java based framework for non-blocking and highly parallelized Dom testing.

why?

The motivation to bring this little savvy guy to life was the need to have a robust and fast solution to relieve a long-running and unstable Selenium suite. After a code dive through these Selenium tests it turned out that many of them only checked things (like Dom elements, displayed data, cookies, etc.) without interacting with a web browser.

Benefits

Speed

Paco is doing his job rapidly fast and reliable. In a bigger test project where this framework is in use it runs ~400 tests in less than 10 seconds. When using Paco you can focus on your tests itself instead of messing around with setting up a complex test project yourself.

Convenient Config

Paco allows you to configure all your test specific data individually and directly in place (on your test method and/or test class) via annotations. You only need to describe how you want to fetch an http response (e.g. requesting a web page by using a proxy, mobile userAgent, setting cookies, add a specific referrer, doing a POST that sends some request body, etc).

Readability and Focus

Due to the given convenient methods regarding response relevant data and using the provided jUnit rule, you'll end up with nicely readable and easy to write tests without boilerplate code.

page-content-tester's People

Contributors

christian-draeger avatar patrick-gulbin avatar pagu23 avatar

Stargazers

David Graesser avatar Jayesh Dalal avatar Code Revisited avatar Mohit Vora avatar Christopher Lambrou avatar  avatar  avatar Artjom Simon avatar Alex avatar Andi Bräu avatar Kobe avatar Stefan Bissell avatar Tillmann Heigel avatar

Watchers

James Cloos avatar Fiete Otto avatar chrgue avatar  avatar  avatar

page-content-tester's Issues

isElementPresent fails if element is not present on page

invoking paco.fetcher.Page.isElementPresent(String) on a page where the requested Element is not present leads to an IllegalArgumentException.

Instead it should return false

java.lang.IllegalArgumentException: Request has already been read (with .parse())

        at org.jsoup.helper.Validate.isFalse(Validate.java:64)
	at org.jsoup.helper.HttpConnection$Response.prepareByteData(HttpConnection.java:861)
	at org.jsoup.helper.HttpConnection$Response.body(HttpConnection.java:874)
	at paco.fetcher.FetchedPageForTest.getPageBody(FetchedPageForTest.java:53)
	at paco.fetcher.FetchedPageForTest.store(FetchedPageForTest.java:155)
	at paco.fetcher.FetchedPageForTest.storeIfNotFound(FetchedPageForTest.java:163)
	at paco.fetcher.FetchedPageForTest.isElementPresent(FetchedPageForTest.java:130)
	at pagecontent.testcases.CobiIT.is_element_absent_when_english(CobiIT.java:32)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.