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
462
votes
14 answers

What is the difference between unit tests and functional tests?

What is the difference between unit tests and functional tests? Can a unit test also test a function?
mousey
  • 11,601
  • 16
  • 52
  • 59
167
votes
11 answers

Difference between acceptance test and functional test?

What is the real difference between acceptance tests and functional tests? What are the highlights or aims of each? Everywhere I read they are ambiguously similar.
JavaRocky
  • 19,203
  • 31
  • 89
  • 110
106
votes
9 answers

Catching exceptions from Guzzle

I'm trying to catch exceptions from a set of tests I'm running on an API I'm developing and I'm using Guzzle to consume the API methods. I've got the tests wrapped in a try/catch block but it is still throwing unhandled exception errors. Adding an…
Eric
  • 1,253
  • 2
  • 10
  • 15
58
votes
4 answers

The opposite of assert_select?

I am writing an app where it is desirable to check if a view does not have some functionality - in particular because that functionality must be presented only to users in certain security group. I am looking for the opposite of assert_selects in…
Victor Pudeyev
  • 4,296
  • 6
  • 41
  • 67
53
votes
11 answers

Set Rspec default GET request format to JSON

I am doing functional tests for my controllers with Rspec. I have set my default response format in my router to JSON, so every request without a suffix will return JSON. Now in rspec, i get an error (406) when i try get :index I need to do get…
Drazen
  • 2,776
  • 1
  • 25
  • 39
52
votes
3 answers

Using Mockito to mock a local variable of a method

I have a class A that needs to the tested. The following is the definition of A: public class A { public void methodOne(int argument) { //some operations methodTwo(int argument); //some operations } private void…
user657592
  • 1,031
  • 4
  • 16
  • 24
51
votes
13 answers

Best way to take screenshots of tests in Selenium 2?

I need a way to take screenshots of my functional tests. Right now I'm using Selenium 2 with C# bindings. I pretty much want to take a screenshot at the end of the test to make sure the desired page is displayed. Are there any particular tools you…
James
  • 5,622
  • 9
  • 34
  • 42
46
votes
7 answers

Does Python have anything Like Capybara/Cucumber?

Ruby has this great abstraction layer on top of Selenium called Capybara, which you can use do functional/acceptance/integration testing. It also has another library called Cucumber which takes this a step further and lets you actually write tests…
machineghost
  • 33,529
  • 30
  • 159
  • 234
45
votes
2 answers

What's the meaning of the percentages displayed for each test on PyTest?

I'm new to testing with Pytest, and I've run into a minor but annoying hangup. In the command line test session results, I see my tests passing, but the percentage shown is not 100%, for some tests. With some aggressive logging, I was able to…
klreeher
  • 1,391
  • 2
  • 15
  • 27
44
votes
6 answers

How to run a single test in nightwatch

How do I run only Test 3 from the following tests? module.exports = { 'Test 1':function(){}, 'Test 2':function(){} 'Test 3':function(){} }
Mohamed El Mahallawy
  • 13,024
  • 13
  • 52
  • 84
44
votes
4 answers

Using Moq to Mock a Func<> constructor parameter and Verify it was called twice

Taken the question from this article (How to moq a Func) and adapted it as the answer is not correct. public class FooBar { private Func __fooBarProxyFactory; public FooBar(Func fooBarProxyFactory) { …
thehumansaredead
  • 525
  • 1
  • 4
  • 7
42
votes
7 answers

tools for testing vim plugins

I'm looking for some tools for testing vim scripts. Either vim scripts that do unit/functional testing, or classes for some other library (eg Python's unittest module) that make it convenient to run vim with parameters that cause it to do some…
intuited
  • 23,174
  • 7
  • 66
  • 88
38
votes
2 answers

How to create admin user in django tests.py

I'm trying to create an admin user as part of my tests.py to check on persmissions. UPDATE: The tests.py is standard format that subclasses TestCase and the code below is called in the setUp() function. I can create a normal user but not an admin…
PhoebeB
  • 8,434
  • 8
  • 57
  • 76
35
votes
9 answers

How to test for the appearance of a Toast message

Would anyone know how to test for the appearance of a Toast message on an Activity? I'm using code similar to what the OP posted on this question for testing my program flow from one activity to the next. I'd also like to be able to test for toast…
Adrian
  • 2,123
  • 3
  • 18
  • 24
35
votes
9 answers

In Rails, how do you functional test a Javascript response format?

If your controller action looks like this: respond_to do |format| format.html { raise 'Unsupported' } format.js # index.js.erb end and your functional test looks like this: test "javascript response..." do get :index end it will execute the…
Teflon Ted
  • 8,696
  • 19
  • 64
  • 78
1
2 3
99 100