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
14
votes
1 answer

Component vs Integration vs Functional tests

Recently I figured out that my understanding of different types of tests maybe is not completely right. E.g. Unit test is testing of one unit where interaction with other units is based on mocks (fakes, stubs). So, no interaction with file system,…
Zeljko
  • 250
  • 1
  • 2
  • 12
14
votes
2 answers

Testing devise with shoulda

I'm having some difficulties in testing devise with shoulda: 2) Error: test: handle :index logged as admin should redirect to Daily page. (Admin::DailyClosesControllerTest): NoMethodError: undefined method `env' for nil:NilClass devise (1.0.6) [v]…
morgan freeman
  • 6,041
  • 3
  • 25
  • 32
14
votes
5 answers

Rails functional test: sending URL query parameters in POST request

I'm sending a POST request in a Rails functional test like this: post :create, collection: { name: 'New Collection' } collection gets sent as JSON-encoded form data, as expected. What I can't figure out is how to add a query to the URL. The…
alexantd
  • 3,543
  • 3
  • 27
  • 41
14
votes
1 answer

Symfony 2 controller test can't pass Authorization header

I have an HTTP API written in Symfony 2 and I'm writing some functional tests for it. I noticed that when I try to send an Authorization header it is not received in the controller when I log the received headers. In the test controller: $client =…
Luke
  • 20,878
  • 35
  • 119
  • 178
13
votes
5 answers

How to Automate Testing of Medium Trust Code

I would like to write automated tests that run in medium trust and fail if they require full trust. I am writing a library where some functionality is only available in full trust scenarios and I want to verify that the code I wish to run in medium…
Ian Davis
  • 3,848
  • 1
  • 24
  • 30
13
votes
7 answers

Symfony2 functional testing InvalidArgumentException: The current node list is empty

I get "InvalidArgumentException: The current node list is empty." running functional tests through PHPUnit. Here is test i wrote: public function testAdd() { $client = static::createClientWithAuthentication('main'); $crawler =…
VitalyP
  • 1,867
  • 6
  • 22
  • 31
13
votes
1 answer

Testing for 400 errors with paste on a web.py app

I'm using paste to do some functional testing on my 'controllers' in my web.py app. In one case I'm trying to test for a 400 response when a malformed post is made to an API endpoint. Here is what my test looks like: def…
Matt W
  • 6,078
  • 3
  • 32
  • 40
13
votes
3 answers

How to mock service with symfony 4 in functional tests?

I have an commandbus handler, which injects some service: class SomeHandler { private $service; public function __construct(SomeService $service) { $this->service = $service; } public test(CommandTest $command) { …
13
votes
2 answers

Express.js server with functional programming (pure routes)

My goal is to be able to write pure routes for an Express.js server. Is that even possible? For accessing the database and stuff I know I can use the fabulous Future monad to keep things pure, but how about the route rendering itself? One of the…
13
votes
2 answers

What are the pros & cons of functional testing frameworks for a new grails application?

I've got analysis paralysis looking at all the different functional testing options for a new grails (v1.3.4) application. I've looked at WebDriver/Selenium (which I've used before) WebTest/Canoo Geb Tellurium Grails Functional Test and there must…
John
  • 6,701
  • 3
  • 34
  • 56
13
votes
2 answers

How to structure my RSpec test folders, files and database?

I have been developing in RoR for more than a year now, but I'm just starting to use tests, using RSpec. For standard model/controller tests, I usually don't have any problem, but the issue is that I want to test some complicated functional…
13
votes
2 answers

Configuring IntelliJ so it takes a specific configuration file to run tests?

I am using Play Framework 2.3 and IntelliJ IDEA 14. I use a Mailer plugin in my application. I wrote a few functional tests that work perfectly when I run the test command in the SBT console, after adding this line to build.sbt: javaOptions in Test…
Thomas
  • 1,491
  • 13
  • 23
12
votes
3 answers

Error: Unable to find the controller for path "/login_check". The route is wrongly configured. (LexikJWTAuthentication)

Description When I'm doing a normal request to my symfony server running on http://localhost:8000/api/admin/login_check it returns the desired jwt token. However, when I do it with the functional tests (with ./bin/phpunit) I get the following…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
12
votes
2 answers

How to design functional testing in a RESTful ZF2 application?

I'm planning an Apigility driven RESTful Zend Framework 2 application. For unit testing and probably also for database testing PHPUnit will be used. Now I'm about to defining functional tesgin for the application. "Functional testing" means for me…
automatix
  • 14,018
  • 26
  • 105
  • 230
12
votes
1 answer

How do i test fabric tasks

has anyone managed to test their fabric tasks? is there a library out there that can help with this? I'm quite familiar with patching/mocking, but its pretty difficult with fabric, I've also had a look through fabrics own test suite, which was of no…
farridav
  • 933
  • 8
  • 18