[QUESTION] Assertions vs. Checks UI
See original GitHub issueGiven this test definition:
testDefinition:
- selector: span[name = "POST /pokemon/import"]
assertions:
- tracetest.span.duration <= 50ms
- http.status_code = 200
- tracetest.response.body contains 52
- selector: span[name = "queue.synchronizePokemon send"]
assertions:
- messaging.payload contains 52
I read this as "I have two tests
or checks
. In this first test / check
I am asserting 3 things (ie. I have 3 assertions).
However the UI flips these definitions and calls the assertions
above, checks
. So according to the UI, I have 2 assertions
. Assertion 1 contains 3 checks and assertion 2 contains 1 check.
Can someone clarify which was round is correct?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
what is the difference between triggers, assertions and ...
Both CHECK and ASSERTION are database constraints defined by the SQL standards. An important distinction is that a CHECK is applied to a ......
Read more >which is better, using Assert[] or manual checks on ...
Like in other programming languages, such as C or Java, assertions are used to catch errors in the logic of your code.
Read more >Difference between Assertions and Triggers in DBMS
DBMS always checks the assertion whenever modifications are done in the corresponding table. Syntax –. CREATE ASSERTION [ assertion_name ] CHECK ...
Read more >Assert and Verify Methods in Selenium
In Selenium, Asserts are validations or checkpoints for an application. Assertions state confidently that application behavior is working as ...
Read more >Python's assert: Debug and Test Your Code Like a Pro
These checks are known as assertions, and you can use them to test if certain assumptions remain true while you're developing your code....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree with @agardnerIT in the following structure:
Test – has a set of
checks
– with a selector – that can match multiple spans – and apply multipleassertions
against these selected spansIn my mind, an assertion is one single affirmation, and most test tools use that term with a similar meaning.
Maybe we can find a new word for
check
that makes it easier to understand the concept ofselector + assertions
. Any idea?Perhaps for above: I have one test. The test consists of two checks defined by one selector for each test. Check
#1
contains 3 assertions. Check#2
contains one assertion.Sidenote - the UI doesn’t opinionated on when a “check” fails (ie. if all 3 assertions fail, is the “check” assumed to have failed?)