magosi

magosi

Hi. I am busy working through this book: https://shankardevy.com/phoenix-inside-out-mpf/
It implements an online store by means of TDD in Phoenix. I am confused, however, as the author of this book only uses acceptance tests (via Hound) and unit tests. In the book, Programming Phoenix, the author used integration and unit tests only. Comparing the integration tests from Programming Phoenix with the acceptance tests from this book, it seems they basically test the same thing. What is the difference between them. How do you write integration and acceptance tests without repeating what is being tested?

Any help, advice and resources will be appreciated. I am somewhat new to the world of TDD and best practices regarding testing.

Showing Posts 1 to 2

ityonemo

ityonemo

Colloquially, (and probably in most applications) they’re often the same.

Technically, acceptance tests have to do with engineering specs - does the spec that you’re sending to your end user match the actual behavior of the system.

Integration tests are any collection of tests that cross coding boundaries. Acceptance tests are almost always a strict subset of Integration tests.

“If it hits the database it’s an integration test”. “If it goes over the network it’s an integration test”

Honestly, if you do it right elixir database tests are so fast that I typically lump them in with the unit tests (as a matter of code organization in directory structure, I label fast tests as ‘unit’ vs slow ‘integration’ tests). This is sloppy, but nobody bats an eye.

Happy to be corrected and learn if someone else has a different view of this!

Vesuvium

Vesuvium

Integration tests pertain to a single code base and check whether modules work when they are combined together. They are written by the same engineers that write the code base.

Acceptance tests are about the entire product and mimic the actions of an user (good or bad). They are written and run by another team, usually.

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews