Event Listeners in API* testing?
Yes - If you can implement your tests in the system you can perform calls and test the result as expected from tools like Postman.
But integration of tests open the door to a better understanding of what the system is doing behind the scenes - and it allow you to test the system and remain a "black box tester" (That one that uses magic to find bugs).
Here is an example I created to explain how to use an event listener inside a test**:
In the example:
1) The data that is being tested:
2) Retrieve the data from the API call that performed from the tested system to another server.
3) The test result that can be sent to the test report.
*The focus in API tests should remain on testing the API calls and this is why in this example and also in real test systems that I am creating, I will perform separate tests that will pass if the correct data is present in the API calls, and whether or not this data is used in the correct way will be tested in the functionality tests system - In this way API tests are more likely to remain a relevant part of the sanity testing when functionality tests might be skipped in tight CI schedule.
**a more realistic scenario to a use of event listeners is to verify that when the system is published to a server, It uses the correct data from the servers system it was published to (for example retrieve the correct files from Firebase).
Business Marketing and Sales manager
8 个月???? ??? ?? ??????! ??? ????? ???? ?????? ?????? ????? ?????? ????? ??? ????? ??????? ?????? ?????? ?????? ??????: https://chat.whatsapp.com/HWWA9nLQYhW9DH97x227hJ
CEO @ Immigrant Women In Business | Social Impact Innovator | Global Advocate for Women's Empowerment
8 个月???? ??? ?? ?? ???????? ??? ?????? ???? ?????? ???: ?????? ????? ??? ??????? ????? ????? ?????? ??????. https://chat.whatsapp.com/HWWA9nLQYhW9DH97x227hJ