views:

164

answers:

3

I need to test a program I wrote that receives XML as a text upload from a browser. I'm looking for a tool that will allow me to send the same content over and over instead of having to generate it new each time.

I am looking for an Application that can send a text file to a server

or

a way to do this with JavaScript and HTML

The solution to this problem dose not involve Ethereal / Wireshark (though it is a use full tool)

A: 

Use curl:

echo '<xml />' | curl -X POST -H 'Content-type: text/xml' -d @- http://myurl
Don Werve
A: 

Depends on how much you want to rely on the "browser" side.

If you just want a POST request that sends the contents of the file, or the file itself, you could just use a PHP library like Zend_Http or snoopy.

Snoopy is a php class that simulates a web browser, you can find it on source forge. http://sourceforge.net/projects/snoopy/

Andrei Serdeliuc
A: 

Have you seen Selenium ? You can automate your browser-side testing in this, and thus automate your XML submission

Brian Agnew