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
1
vote
1 answer

Boost UTF using system in global fixture

I am trying to check for a running server process in a Boost UTF global fixture. I am doing this with a call to system in my fixture constructor like this... class MyTestFixture { public: MyTestFixture(); ~MyTestFixture()…
Jon Tilson
  • 11
  • 1
0
votes
1 answer

When I use Fixture with SqlAlchemy in my unit tests, why am I unable to confirm changes to the database during test?

I am testing a message processer that uses SqlAlchemy (v0.7.4). In my test, I am using Fixture (v1.4) with Sqlite to set up and tear down a temporary database. My fixture data includes a file table with a status field that should get updated when…
klenwell
  • 6,978
  • 4
  • 45
  • 84
0
votes
1 answer

How to ensure fixtureA

I was confused in using contactlistener of box2d.Now I have body1 & body2.When 2 bodies had contact,how can I ensure the body of fixtureA is body1 or body2?Or how can I figure out which body belongs to fixtureA? I have made the experiment and…
ManuQiao
  • 708
  • 8
  • 20
0
votes
1 answer

Mysql Stored procedure for a Fixture

i cannot finish this becaus is giving me an annoying error that i check and check but i still don't know what is going on, here is the code DROP PROCEDURE IF EXISTS gen_par; CREATE PROCEDURE gen_par() BEGIN DROP TABLE IF EXISTS tmpPool; …
Enrique Benitez
  • 649
  • 2
  • 13
  • 28
0
votes
1 answer

Coordinate CCSprite with b2Fixture

I have created a single body in box2D, which consists of 2 fixtures. I have a CCSprite userData for each fixture, but i don't know how to set the sprite position and rotation to match the fixture shape...i can't find shape.position or…
Fernando
  • 7,785
  • 6
  • 49
  • 81
0
votes
2 answers

Making a django Fixture that gets 100 items from each Table, or follows foreign keys

I need to create some fixtures for django test. Does anyone know of a shortcut that lets me get x number of rows from every table in database and serialize it? Background: I have Multiple tables with 10's of millions of entries. I have tried to…
dm03514
  • 54,664
  • 18
  • 108
  • 145
0
votes
2 answers

Box2d sensor rotation problem

in my app the user is able to move or rotate a box2d fixture. The collision detection works fine. But if I set the fixture as a sensor, with the SetSensor(true) method, the collision detection reacts weird. In the following picture the red…
chachoo
  • 211
  • 3
  • 10
0
votes
0 answers

Django : translation not found only during tests

I'm doing functional tests (Selenium) on my django app, and I want to include some fixtures. So first, I tried to load fixtures using manage.py: ./manage.py dumpdata > db.json ./manage.py loaddata db.json No errors, I decided to use this data for…
AntoineLB
  • 482
  • 3
  • 19
0
votes
2 answers

Django 2.0 - test using fixtures from dumpdata gives utf8mb4 encoding errors

I am using utf8mb4 encoding for my mySQL database. All my Django apps work correctly with it even with Cyrillic characters. But when I run ./manage.py test and try to load a fixture dumped from the same database, I get errors regarding the…
Teddy Markov
  • 266
  • 3
  • 15
0
votes
1 answer

How to share a heavy object in Nunit between fixtures?

All. I do some integration tests with NUnit and need a long running client setup per fixture. For me it will be good to setup the client only once. This will significantly reduce overall time. i do it now with a static field in the parent fixture.…
0
votes
1 answer

Symfony 3.4 and Fixtures Bundle

I'm using symfony 3.4.1 with doctrine/doctrine-fixtures-bundle": "2.4.1 I'm trying to run fixtures, but I have this message when I'm trying to inject the UserPasswordEncoderInterface to encode my…
Kevin
  • 4,823
  • 6
  • 36
  • 70
0
votes
1 answer

FitNessse Test can not find Fixture

I have written following Fixture and FitnessTest for that fixture, but somehow FitNesse is not able to find the Fixture. I simply provide username and password (blank intentionally), and then check for languagecode, countrycode, and variantcode for…
Ragini
  • 1,509
  • 7
  • 28
  • 42
0
votes
1 answer

Update sql fixture with other sql

For a list of automated tests we use sql fixtures to prepare the database in a desired state. The problem is however that the database is frequently updated where columns can be added, or removed from different tables. This is done with other sql…
telefoontoestel
  • 357
  • 1
  • 2
  • 14
0
votes
1 answer

Can I use fixtures to create a test from production database?

I have found a strange bug in my Django application. I have a view accessible on /people/. In tests it works just fine, but in production I have stumbled over a bug at several (just a few!) pk's: Reverse for 'single-person' with arguments…
texnic
  • 3,959
  • 4
  • 42
  • 75
0
votes
2 answers

How to add a button in FitNesse Test case?

The scenario is as follow: I want to pause the test when it encounters the Button in the Wiki page Test Scenario. It should wait until the user presses the Button and once the button is pressed the test should continue.
1 2 3
8 9