Questions tagged [fixture]

Fixed state(s) for software under test, also known as text context

In software testing, a test fixture is a fixed state of the software under test used as a baseline for running tests; also known as the test context. It may also refer to the actions performed in order to bring the system into such a state.

It is often used in and .

Examples of fixtures:

  • Loading a with a specific, known set of
  • Erasing a hard disk and installing a known clean operating system installation
  • Copying a specific known set of files
  • Preparation of input data and set-up/creation of fake or objects
  • Software used to systematically run reproducible tests on a piece of software under test is known as a test; part of its job is to set up suitable test fixtures.

Source

132 questions
0
votes
1 answer

How to capture stdout and stderr in python using fixture that runs in the background

I want to write a custom logger for a set of tests without making any significant changes to the tests. I would like to use something like a fixture that I can just pass to the test method and the fixture runs in the background during the entire…
S. S.
  • 1
  • 1
0
votes
1 answer

Nunit 3 console runner issue in fixture and xml output generation

I am using final builder 7 actions Nunit with fixture and xml output options. when i was running with NUnit version 2.6.4 it works fine. But i have upgraded version to 3.0 ie nunit3.console Please check this link for final builder options provided…
Rahini Krishna
  • 93
  • 2
  • 15
0
votes
1 answer

Do we actually test the 'Fixture' when using FitNesse?

This is more of a discussion I guess, and I would like to hear the opinions of others who use FitNesse. I'm quite new to FitNesse and was reading for last few days. I understand the concepts of the 'test wiki' and the 'Fixtures' and the test runs…
neo_er
  • 5
  • 1
  • 4
0
votes
1 answer

Using the same object from different PyTest testfiles?

im working with pytest right know. My Problem is that I need to use the same object generated in one test_file1.py in another test_file2.py which are in two different directories and invoked separately from another. Heres the code: $…
shujin
  • 3
  • 1
0
votes
1 answer

Django loaddata error __init__() takes exactly 3 arguments (1 given)

I'm having trouble trying to initialize some data. When I run manage.py loaddata --verbosity=1 initial.json With this as my initial.json file: [ { "model": "listen.Playlist", "pk": 1, "fields": { "message": "Hello There!", …
0
votes
1 answer

How to pass data stored in table between test pages in fitnesse

In my fitnesse project i've got one table which stores authentication data to database. I'm using it on each site. Is it possible to have one site with that table and allow all other test sites use data from it? how i can define global table with…
tusty
  • 1
  • 1
0
votes
2 answers

why python nose unittest teardown fixture failed

I'm using nose test framework. When running a test module, the teardown function defined in it failed. the error raised says the fixture is locked by another process. here is my test module, test_my_module.py: ... ... def teardown(): if…
John Wang
  • 4,562
  • 9
  • 37
  • 54
0
votes
1 answer

Boost Test entry/exit fixture with manual registration

I am using Boost 1.61 and I am working with the following type of Boost Test setup where I am manually registering tests: // testsuite.cpp #include using boost::unit_test::test_suite; test_suite* init_unit_test_suite(int,…
Francis
  • 529
  • 4
  • 15
0
votes
1 answer

How to set a class or module attribute in a patchmonkey in py.test

I'm starting a small project in Python and I want to create a unittest with py.test. I need to patch a pymongo module or a MongoClient class. So I tried something like this: @pytest.fixture(scope='module') def mock_pymongo(monkeypatch): …
aj.styles
  • 1
  • 2
0
votes
1 answer

Handing Arrays in soap webservice testing using fitnesse

Is there a way to dynamically create tables in wiki? Usecase : I'm trying to mimic similar to soap sonar in fitnesse. SOAP SOANR 1. Once we import the wsdl, soap sonar generates inputs for operations in wsdl. 2. Choose a operation, Enter input and…
user724747
  • 97
  • 1
  • 7
0
votes
1 answer

why the pytest fixture does not rollback data after each test function has run?

i write a pytest fixture to rollback data after each test function has run, which seems to make no sense. The fixture is below: @pytest.fixture(scope='function') def session(db, request): """Creates a new database session for a test.""" …
jjwt
  • 5
  • 1
  • 6
0
votes
3 answers

Jasmine : Fixture could not be loaded

So i wanted to get into Test Driven Development and decided to use Jasmine on my project. The thing is, i can't load fixtures. The 2 solutions commonly proposed are : Run chrome with --allow-file-access-from-files Serve the file from you local…
Loïc N.
  • 353
  • 3
  • 17
0
votes
1 answer

Add doctrine fixture in composer.json

How can I add two doctrine ficture to composer.json? I think I have to include in: "require": { } I have my fixture in src/AppBundle/DataFixture/ORM/
Isky
  • 1,328
  • 2
  • 14
  • 33
0
votes
1 answer

Parsing Xhtml strict documents with RestFixture

I have an xpath like //xhtml:title[text()='Page Title'] and am getting an error from RestFixture that reads java.lang.IllegalArgumentException: Cannot extract xpath '//xhtml:title[text='Page Title']' from the document When I remove the from the…
MattR
  • 279
  • 1
  • 3
  • 12
0
votes
1 answer

Fixture DOCTRINE2

When I use: php app/console doctrine:fixtures:load --fixtures=/var/www/Symfony/src/BISSAP/ForumBundle/DataFixtures/ORM** I get the following error: PHP Catchable fatal error: Argument 1 passed to BISSAP\ForumBundle\Entity\Forum::setCategory()…
Bissap
  • 521
  • 1
  • 5
  • 23
1 2 3
8
9