Questions tagged [functional-testing]

Functional testing is a quality assurance (QA) process and a type of black box testing that bases its test cases on the specifications of the software component under test.

Functional testing is a quality assurance (QA) process and a type of black box testing that bases its test cases on the specifications of the software component under test.
Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered (not like in white-box testing).
Functional Testing usually describes what the system does.

Functional testing typically involves five steps:

  1. The identification of functions that the software is expected to perform
  2. The creation of input data based on the function's specifications
  3. The determination of output based on the function's
  4. The execution of the test case
  5. The comparison of actual and expected outputs
1493 questions
20
votes
1 answer

Is there a good example of functional testing a Tkinter application?

I found a great website that discusses functional testing of a Python GUI application using IronPython, but I want to use Tkinter and am having a hard time making the transition between the libraries. Michael shows this example for IronPython: class…
Wes Grant
  • 829
  • 7
  • 13
20
votes
6 answers

Integrating Automated Web Testing Into Build Process

I'm looking for suggestions to improve the process of automating functional testing of a website. Here's what I've tried in the past. I used to have a test project using WATIN. You effectively write what look like "unit tests" and use WATIN to…
Haacked
  • 58,045
  • 14
  • 90
  • 114
19
votes
3 answers

Symfony web test case JSON

How can I run a webtestcase agains an API? The default guide regarding functional tests only give the following command: $client = static::createClient(); $crawler = $client->request('GET', '/some-url'); The Crawler class is a DOM crawler. I…
Gasim
  • 7,615
  • 14
  • 64
  • 131
19
votes
5 answers

Making functional tests in Rails with Devise

After 3 years of procrastination today is the day that I start testing my Rails apps. My first step is to fix the failing tests in my Rails 3 beta4 app. My last 3 failing tests have to do with the devise gem and its authenticate_user! method in a…
allesklar
  • 9,506
  • 6
  • 36
  • 53
19
votes
8 answers

HTTP Basic Auth via URL in Firefox does not work?

I know that normally you can login to sites that require HTTP basic authentication with Selenium by passing the username and password in the URL, e.g.: selenium.open("http://myusername:myuserpassword@mydomain.com/mypath"); I've been running a…
Peter
  • 439
  • 3
  • 7
  • 12
19
votes
3 answers

Where the heck is any Selenium 2 documentation for PHPUnit?

I'm having a frustrating time trying to find any information on Selenium 2 for PHPUnit except for source code and tests that I can "look through" to "figure it out". Everyone's favorite seems to…
Ben
  • 54,723
  • 49
  • 178
  • 224
19
votes
2 answers

How should I write functional tests for Yii web application that will be run on selenium server?

I am currently setting up a development environment for my new project and I am thinking hard about one thing. I plan on using Yii. I want to have functional tests automated, I already have gerrit and Jenkins in place, working. I read this note and…
Nebril
  • 3,153
  • 1
  • 33
  • 50
18
votes
2 answers

How to test a GraphQl API?

I need to write a functional test suite (that will test a GraphQl API). The test suite will be in a separate repo and container from the API. One approach I thought of would be to use a BDD framework within the test suite. The suite would run all…
Nelson
  • 2,972
  • 3
  • 23
  • 34
18
votes
3 answers

How to retrieve a streamed response (e.g. download a file) with Symfony test client

I am writing functional tests with Symfony2. I have a controller that calls a getImage() function which streams an image file as follows: public function getImage($filePath) $response = new StreamedResponse(); …
Lorenzo Polidori
  • 10,332
  • 10
  • 51
  • 60
17
votes
3 answers

Rails Functional Test Case and Uploading Files to ActionDispatch::Http::UploadFile

I'm am adding tests to a Rails app that remotely stores files. I'm using the default Rails functional tests. How can I add file uploads to them? I have: test "create valid person" do post(:create, :person => { :avatar =>…
Kevin Sylvestre
  • 37,288
  • 33
  • 152
  • 232
17
votes
5 answers

Mocha Mock Carries To Another Test

I have been following the 15 TDD steps to create a Rails application guide - but have run into an issue I cannot seem to resolve. For the functional test of the WordsController, I have the following code: class WordsControllerTest <…
MunkiPhD
  • 3,636
  • 1
  • 29
  • 51
17
votes
4 answers

Getting Dagger to inject mock objects when doing Espresso functional testing for Android

I've recently gone whole-hog with Dagger because the concept of DI makes complete sense. One of the nicer "by-products" of DI (as Jake Wharton put in one of his presentations) is easier testability. So now I'm basically using Espresso to do some…
16
votes
7 answers

How to post JSON data in rails 3 functional test

I plan to use JSON data in both request and response in my project and having some problems in testing. After searching for a while, I find the following code which uses curl to post JSON data: curl -H "Content-Type:application/json" -H…
cyfdecyf
  • 816
  • 2
  • 10
  • 20
16
votes
7 answers

(Rails) Assert_Select's Annoying Warnings

Does anyone know how to make assert_select not output all those nasty html warnings during a rake test? You know, like this stuff: .ignoring attempt to close body with div opened at byte 1036, line 5 closed at byte 5342, line 42 attributes at open:…
CalebHC
  • 4,998
  • 3
  • 36
  • 42
16
votes
3 answers

Debugging code in the Python interpreter

I like testing functions in the Python interpreter. Is it possible to debug a function in the Python interpreter when I want to see more than a return value and a side effect? If so, could you show basic debugger operations (launching the function…
xralf
  • 3,312
  • 45
  • 129
  • 200