I'd like to provide a browser page to help non-techies run the various tests I've created using the standard django test framework.
The ideal would be for a way to display all the tests found for an application with tick boxes against each one, so the user could choose to run all tests or just a selection.
Output would be displayed in a window/frame for review.
Anyone know of such a thing?
Not quite what you've asked, but sounds a bit like Fitnesse, which allows non-technical users to define tests in a wiki-like syntax and run them from the browser. It is possible to link this up to Django's test framework.
Related
I have a django site which uses gevent-socketio for a word game and I would like to automate the tests.
Since gevent-socketio implies user interaction and JavaScript actions I'm stuck in how to start writing tests.
Anyone can point me in the right direction?
Here are some referrals:
selenium. Basically, it's testing in a real browser that django can integrate with by the help of LiveServerTestCase.
mechanize - programmatic web-browsing. It's a very powerful tool, definitely worth looking. Note that it can "talk" to javascript.
sikuli - testing tool that works using screenshots. Very powerful too, but may be a bit too exotic in your case.
Hope that helps.
I am still trying to totally understand BDD and I am facing some doubts.
From my little experience, I have been using it to automate user acceptance test and I would like to know if it's possible to use it to test a web API, without UI.
In the past I've used BDD using the given-when-then jargon and mapping the steps to UI interactions. I've done this with Specflow in ASP.NET or cucumber/capybara in ruby on rails.
So for example we could have scenarios like this:
Given I am in the home page
When I click login button
Then I should see the login page
The current project I am working at is different. We are implementing an API based in web service which would be consumed by different type of clients. Like an iphone app, android app and an asp based web client. So our main focus is based in the back-end and just that.
In this case, the tests can't be faced from the UI point of view. So our end-to-end tests are based in our service endpoints. We pass some input arguments to a service calls and check the outputs.
Can we do this using BDD? Is this right?
or maybe it would be better to use a different thing like FitNesse?
Hmm.. is using FitNesse doing BDD?
I think you can do what your writing about in BDD. I'm not sure if those 2 links about testing of webservices with SpecFlow will help you but take a look on them if you haven't seen it yet.
http://codedetective.blogspot.co.uk/2012/10/testing-webservices-with-specflow.html
http://www.creamdog.se/blog/2011/02/24/webservices-automated-tests-using-specflow-and-babelfish/
Have a look at Karate, web service testing framework by Intuit. It's recently being open sourced. It has the capability of handling API dealing with HTML, JSON, XML, GraphQL queries and is built on top on cucumber.
Simple intro here : https://medium.com/blueprint-by-intuit/karate-web-services-testing-made-simple-366e8eb5adc0#.qnpy5gagt
How do you go about unit-testing ExtJS web apps using Selenium?
Can you point me to some web resources or book regarding this issue?
What pieces of your application are you looking to test using Selenium? Unit testing implies smaller pieces than a full "UI" test, from my perspective. If you're looking to do true unit testing, you will probably want to pull in some library like jsUnit or qUnit and then just have Selenium run those tests, and then grab the resulting information.
I haven't directly used Selenium to test the view itself, since I've always considered that to be pretty solid, coming directly from the Sencha crew. If you're trying to go down this road, your best bet would probably be to search the official selenium user group. They appear fairly active. The user group would potentially be a good resource for asking questions, as well. While keeping in mind that ExtJS is just a powerful way to alter the DOM in a very dynamic fashion.
...and I just noticed the links off to other pages that have already been provided. Still valid data, so I'm going to post it anyways. :)
I'm looking for a web service testing framework that has a good built in text input / output gui. The point would be for business and other non developer users to be able to test requirements by using a simple gui that they could enter values into and see the results from the web service. I have seen lots of references on Stack Overflow and the web to great developer web service testing tool but a nice, built in, I/O gui is the key feature for me.
By web service testing I mean a tool that sends xml post requests over HTTP and tests the response.
I have been trying out fitnesse but to use it I need to cut out parts of the system and I very much want to do end to end testing. The way fitnesse displays its results is great but the wiki data entry is a bit clunky for business users imo.
We use FitNesse for the most part. The developers maintain a fixture that s the connector between your app and the FitNesse server. The business user can write the test cases in an wiki style. Works fine for us.
Rational Functional Tester was in the discussion too. However, I have never seen it, but would have met our requirements too.
You might want to look at the robot framework. It's a pretty decent testing library which makes it easy to test web services. There is also a library that integrates Selenium into the framework for front-end testing. Tests can be specified in a couple of plain text formats as well as in HTML tables. You also have the option to let users create test data in spreadsheets if you like, then save them in a tab-separated format.
Look at WebServiceStudio http://www.codeplex.com/WebserviceStudio
We use Concordion for business testing. It's very similar to Fitness but the input files are HTML files "executed" by JUnit.
If your web services don't take 500 parameters, a HTML table is a great way to define input values. I agree, there no UI (although a WYSIWYG HTML editor would do it) but the benefit is that your tests can be checked into Subversion (for example), executed regularly (read every night) and the result HTML files be published internally.
I found testing composite application in Netbeans very easy to use ...
As you requested in your question you can define an input XML and a desired output XML, and when you run the test you have a classic JUnit result like this :
alt text http://netbeans.org/images_www/articles/61/soa/ep-understand-trs/testpassed.png
Here you can find a good example:
Understanding the Travel Reservation Service
I use NetBeans 6.5.1 bundled wit GlassFish ESB 2.1 ... I'm not sure that this feature is supported in the newest NetBeans Versions
I'm looking into automating a test runner which would do the following things daily (or hourly or whenever I want basically):
Pull the latest code from a git repository.
Run the Django test suite or something like Nose.
Run Selenium tests.
Give Pass/Fail and coverage statistics via a web interface.
Email developers in the case of failures.
What kind of setups are out there? I've seen some blog posts, but many are pre-Django 1.1 and I know that the test suite has been improved significantly with that release, so I'm curious what the latest and best options out there are.
I'd take a look at ponybuild, it's the replacement for buildbot that Titus Brown has been working on, and Jacob Kaplan-Moss is already looking at for django. http://github.com/ctb/pony-build/network
Hudson is a really good tool for something like this. It doesn't have any specific support for django (that I know of), it's more of a general purpose tool. It has a plugin model, and it has plugins for git, selenium and cobetura, among other things. It also has a python plugin for running python scripts. and support for sending emails when things go wrong.
Looks like DJango itself uses buildbot