Giter Site home page Giter Site logo

daveparillo / webtest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inferiorminion/webtest

1.0 4.0 0.0 30.37 MB

Web application testing powered by HtmlUnit and and Apache Ant

Home Page: https://daveparillo.github.io/webtest/

License: Apache License 2.0

XSLT 3.42% Shell 0.11% Batchfile 0.05% HTML 2.98% Groovy 1.82% CSS 0.08% JavaScript 3.37% Java 88.18%

webtest's Introduction

webtest

Web application testing powered by HtmlUnit and and Apache Ant https://daveparillo.github.io/webtest/

Building webtest

The build is an ant-based build, but uses maven for dependency resolution.

The lib directory contains a minimal ant and maven runtime capable of building webtest.

If you don't have ant installed, build everything using

$ ./bin/webtest.sh full

If you do have ant, groovy, and maven installed, build evrything using

$ ant full -nouserlib

Either of the above steps produces

  • deploy/webtest.zip (webtest executable release)
  • deploy/doc.zip (webtest manual)
  • deploy/javadoc.zip (webtest api docs)

and some other artifacts as well.

Interestingly, the files webtest.[bat|sh] are the same scripts used to run webtest after installation.

webtest's People

Contributors

daveparillo avatar inferiorminion avatar lukecampbell avatar madmas avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

webtest's Issues

Remove deprecated API's

Several API's duplicate functionality from ant.
It's possible they predate the seamless integration between webtest and ant, but now that such a thing exists, they should be removed, else people may be encouraged to use them.

Specifically:

  • antWrapper
  • scriptStep
  • groovy

add html to static class MessageCollector

The step HtmlParserMessage implements the htmlunit HTMLParserListener in an inner MessageCollector.
The error and warning methods in the abstract class have lately added a new parameter html.
Currently, the interface is stubbed in, but needs to be implemented in the step.

Missing open source license

The main project is copyright Apache 2 http://webtest.canoo.com/webtest/manual/license.html

According to the page the Copyright wasn't updated since 2008, which is basically a huge gray area in terms of whether it's considered public domain or not. (Insert standard I am not a lawyer clause).

To comply with the original license, we should add a LICENSE file that is Apache 2. The original copyright notice should be:

Copyright 2002-2008 Canoo Engineering AG, Basel, Switzerland

And then followed by

Copyright 2016-2017 General Dynamics IT

General Dynamics IT, henceforth known as GDIT, has modified the project and retains the original copyright and license in accordance with the original Apache 2 Open Source License. See LICENSE for more details.

Get build working with Travis CI

Simplify build, remove old cruise control artifacts and references

This is just the compile (and publish?) step. Getting travis to run the self tests is a separate task.

Add ability to set HTTP Content-Type header in invoke step

The webtest attribute soapAction on the invoke API does not support anything other than provide limited support for forms. Tests need to be able to provide an explicit Content_type that matches the package sent in a POST request.

tech refresh

Several important dependencies (i.e. htmlunit) are quite outdated.

Update dependencies and modify affected source as needed.

Migrate running self tests to travis & heroku

Instead of running selftests on a locally checked in jetty, deploy self tests to heroku and run.

It make make more sense to split self test & release tests into a separate github project.

Remove deprecated deployment artifacts

Since hosted on github, building and zipping a deployed "webtest-sources.zip" among other things is redundant.

Javadocs are zipped twice: in javadoc.zip and in doc.zip

Not sure if build-maven should be deleted. Is this ever getting published to maven central?

store steps should have an option to store as response

Currrently, storeXXX steps (storeXPath, storeRegEx, and storeJsonPath especially) all store their results in a property.

This limits the amount of 'chaining' we can do in a test as most of the verify steps expect to operate on the current response.

If the store steps could replace the current response, essentially filtering it, it would add a lot of flexibility to test writing.

Add storeURLencoded and storeURLdecoded API's

Testers are using a variety of similar means to url encode strings before passing them in invoke.
Rather than have code copied in multiple tests, add new API's storeURLEncoded and storeURLDecoded to reduce duplication and enforce a consistent API.

xdoclet errors building manuals

The manuals target throws an error:

Error parsing File /Users/dparillo/dev/NITES/svn/git/webtest/src/main/java/com/canoo/webtest/plugins/pdftest/htmlunit/pdfbox/PdfBoxPDFPage.java:Parse error at line 555, column 9. Encountered: @

The xdoclet parser is complaining about ' @SuppressWarnings("unchecked")'.

There is also the following INFO that looks like a bug:

INFO: Some classes refer to other classes that were not found among the sources or on the classpath. [templatedoclet] (Perhaps the referred class doesn't exist? Hasn't been generated yet?) [templatedoclet] The referring classes do not import any fully qualified classes matching these classes. [templatedoclet] However, since no packages are imported, xjavadoc has assumed that the referred classes [templatedoclet] belong to the same package as the referring class. The classes are: [templatedoclet] /Users/dparillo/dev/NITES/svn/git/webtest/src/main/java/com/canoo/webtest/plugins/pdftest/htmlunit/pdfbox/PdfBoxPDFField.java --> FieldPredicate qualified to com.canoo.webtest.plugins.pdftest.htmlunit.pdfbox.FieldPredicate

Add 'expected' and 'actual' attributes to steps that verify text

The verify steps that don't verify form elements (either they extend AbstractVerifyTextStep, or are VerifyJsonPath) all use an attributed named 'text' to store the expected value. A less ambiguous alternative 'expected' should be added. This would simply be a synonym of the existing 'text' attribute and not add any new function, but would make tests a bit more readable.

In addition, all verify steps can only get their text from one source: the current response.
This limits the ability to preform any kind of processing on the response before verifying,
or to verify things other than responses.

A new optional 'actual' attribute, if set, would be used instead of the current response when conducting a verify step.

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.