bounswe / bounswe2023group4

6 stars 0 forks source link

Learn React Testing #192

Closed kutaysaran closed 11 months ago

kutaysaran commented 11 months ago

Problem Definition

Our objective is to provide team members with a clear and thorough comprehension of React testing. Our focus will encompass various testing methodologies, including unit testing, component testing, and end-to-end testing, to ensure the reliability and functionality of our applications.

Problem Context

This issue is one of the divided issues for frontend research which are indicated in https://github.com/bounswe/bounswe2023group4/issues/166.

Acceptance Criteria

Clear understanding of the fundamental principles of React testing, including the different testing methodologies such as unit testing, component testing, and end-to-end testing.

Suggested Solutions

Unit Testing Common testing patterns

AliNasra commented 11 months ago

I have checked out the links provided by Kutay in the issue description. The guide includes testing scenarios for multiple aspects such as data fetching and rendering. Thanks for the info, Kutay!

selinisik commented 11 months ago

Thank you for the resources, Kutay. Initially, I tried to understand various common testing patterns to grasp the general methodologies. Then, I explored in-depth knowledge about React's unit testing, examining numerous examples and code practices to solidify my learning. Then i found a tutorial in youtube and learned some testing libraries that can be useful in our project.

enfurars commented 11 months ago

I have read the articles and documentation shared in the description of the issue. Now I have a brief idea about testing with mock data, testing user interactions and testing an API call. I believe I will improve my knowledge when we finalize our first features in our app and test them.

kutaysaran commented 11 months ago

After examining the documents in detail and watching the video recommended by Selin, I practiced end-to-end testing, unit testing, and API testing. As used in Selin's suggested video, we can use the testing-library for React testing. When initializing the project, I had added "@testing-library/react": "^13.4.0" to the dependencies. We might also consider adding Cypress. I am closing the issue.