Questions tagged [http-unit]

a Java library for the automatic stimulation and testing of web applications

References:

63 questions
1
vote
1 answer

setParameter at form

I want submit form with some parameters using httpunit. I wrote smt like WebForm form = response.getFormWithID(formId); System.out.println(Arrays.toString(form1.getParameterNames())); //it contains "a" form.setParameter( "a", "bla-bla");…
Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132
1
vote
1 answer

httpunit isn't working when Class extends JFrame

When attempting to login to https://www.okcupid.com/login with the httpunit library, the code below executes successfully. If, however, I extend the class with JFrame so that I can build the UI, the execution fails. The POST request completes…
dbconfession
  • 1,147
  • 2
  • 23
  • 36
1
vote
1 answer

Tomcat Blocks and Not Responding

I have a tomcat server and I'm running Performance Test with junitperf against it. I create 20 simultaneous requests each time. OK, here's the problem: sometimes, it returns really fast, all 20 requests are responded within 3 seconds; but at the…
firstprayer
  • 808
  • 2
  • 11
  • 18
1
vote
0 answers

How to handle the session in HttpUnit

try{ HttpEntity entity=null; HttpGet httpget=null; HttpResponse response=null; httpclient = new DefaultHttpClient(); httpget = new HttpGet(credentialsURL); httpget.setHeader(HttpHeaders.USER_AGENT,…
1
vote
1 answer

Exception in httpunit

I am having a HttpUnit code,in which I am trying to access google''s official website.Here is my code: /** everything you need to start is in the com.meterware.httpunit package **/ import com.meterware.httpunit.*; /** This is a simple example of…
user3903418
  • 143
  • 1
  • 1
  • 11
1
vote
0 answers

eclipse website security certificate

I am working on httpunit in eclipse.I am accessing a website,through WebConversation class of httpunit.This website uses https protocol.Hence I am getting the below exception when i am trying to run my java program. Exception:…
user3903418
  • 143
  • 1
  • 1
  • 11
1
vote
1 answer

When are HttpUnitOptions automatically reset?

When using HttpUnit and setting options via the HttpUnitOptions class, when are the options reset to their defaults? Are they reset at the beginning of every test, the test suite, the test runner, or the lifetime of the JVM ? As an example and…
Justin Ohms
  • 3,334
  • 31
  • 45
1
vote
1 answer

String representation of HTML element in HTTPUnit

Been trying to find a way of getting the String representation of an HTMLElement in HTTPUnit. I'm using HTTPUnit in some tests to get response HTML, and can get the text content of an element, however this does not include a text representation of…
Malcolm Murray
  • 323
  • 2
  • 10
1
vote
0 answers

HTTPUnit Tests for Authorization

I am using HTTP Unit for testing my authorization framework. I have problems when I try to test the cases after the Log-in, because the tests always check the first returned status codes. When someone who is not authenticated tries to access a…
user3464679
  • 309
  • 1
  • 3
  • 13
1
vote
1 answer

Cannot register a servlet which doesn't have mapping in web.xml by ServletRunner?

I am using com.meterware.servletunit.ServletRunner to initialize one of my servlets. I try to use the next method: ServletRunner.registerServlet(String resourceName, String servletClassName) The resourceName, as I understand, is servlet mapping,…
Anton Kasianchuk
  • 1,177
  • 5
  • 13
  • 31
1
vote
1 answer

HttpUnit and Parameters Hidden with Javascript

I am trying to write some test cases in HttpUnit to test a website that has a lot of Javascript in it. The HttpUnit works great - provided I have Javascript disabled through HttpUnitOptions.setJavaScriptEnabled(false)! However, the website that I…
Victoria
  • 11
  • 2
1
vote
0 answers

Junit / HttpUnit poor support on Javascript

I have an application where everything starts from a single servlet and then based on some params to initial servlet complete behaviour of application changes, there are lots of things and forwarding which happens until you get response as a HTML.…
Vivek
  • 580
  • 2
  • 7
  • 26
1
vote
0 answers

Does a jquery form submit not register with HttpUnit

I'm using jQuery in a class project to catch a form submission and add some additional data to the form. Functionally the system works fine. There are no errors and all outputs are as they expected. We are also required to use HTTPUnit to test our…
nate-ward
  • 11
  • 2
1
vote
0 answers

Which is better HTTPUNIT or and headless browser

I am trying to compare it for speed, can they handle xpahts, stability, screenshots, popups. We have a java based framework and we currently use HTTPUnit for our testing which dont have any UI importance. We were doing research and seeing if we…
1
vote
0 answers

How to test RequestDispacher with servlet runner?

I have the the following code to test, I was trying with servlet runner by starting the servletunit client. Everything was fine except dispatcher.include(req,resp).It is throwing some exception at dispatcher. I don't know whether dispatcher is…
M.S.Naidu
  • 2,239
  • 5
  • 32
  • 56