Comments (10)
@shootermv @NoamGaash I would like to get started working on adding Unit Tests (with Jest) too. I don't have much experience with writing Unit tests. So I guess this project could be a great starting point.
from open-bus-map-search.
Hey:)
I don't have much experience with testing, little with jest, some with cypress.
That is why I would love to take this issue. Are there videos Noam posted somewhere on how to do unit tests and e2e?
from open-bus-map-search.
from open-bus-map-search.
Noad did very good guide about e2e palywright tests here https://www.youtube.com/watch?v=jEWG7nYKk_0 for creating unit tests for components, i think you better look at react testing library docs https://testing-library.com/docs/react-testing-library/intro
…
On Wed, Oct 11, 2023 at 9:50 PM Amabelle Trachtenberg < @.> wrote: Hey:) I don't have much experience with testing, little with jest, some with cypress. That is why I would love to take this issue. Are there videos Noam posted somewhere on how to do unit tests and e2e? — Reply to this email directly, view it on GitHub <#107 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKGMHUUMEEW3Y3KZ7R5EADX63S6DANCNFSM6AAAAAA52NLXSY . You are receiving this because you authored the thread.Message ID: @.>
-- http://gs500coder.blogspot.com
Thx for the links:) I'll look into them. You can assign it to me if you like.
from open-bus-map-search.
@amabelleS what kind of tests will you do? e2e/unit/component?
I'll create a separate issue
from open-bus-map-search.
@amabelleS what kind of tests will you do? e2e/unit/component? I'll create a separate issue
all kinds:) we'll start with e2e - #118 :)
from open-bus-map-search.
sounds perfect! thank you both
let me know how I can help
@knightcube @amabelleS
from open-bus-map-search.
@NoamGaash By the way, I am looking for a code coverage tool that can generate code reports. It will help us measure code coverage for our project.
After a bit of debugging, I got to know that we can't use Playwright to create code coverage reports yet. Here is another tool that is helpful to some extent - https://github.com/anishkny/playwright-test-coverage
But I couldn't get it working for our project and hence raised this issue - anishkny/playwright-test-coverage#148
If we used Vitest, it would have been simpler to generate code coverage reports but with Playwright, I guess we just have to wait a bit (sigh!).
Also what if we migrate to Mocha as our testing library instead of Playwright?
Here is a detailed comparison between Mocha and Playwright - https://knapsackpro.com/testing_frameworks/difference_between/mochajs/vs/playwright
from open-bus-map-search.
In my opinion, code coverage is a bad metric - the fact every line in the code executed at least once during your test suite has nothing to do with finding bugs and regressions. Maybe it's good for upper management in some companies, where a rough estimation of "code quality" is required from the RND department, but having 100% code coverage is not something we should be looking forward.
I do consider adding visual tests. as Applitools employee, I think we have an open source plan. I'll check that out.
Anyway, the main focus (in my opinion) should be on preventing regression, and reducing the fear factor.
When I review a pull request, I usually won't run it locally at all. I expect the test suit to test the buisiness logic of the application.
For example, I don't think anyone would break the ordering of menu items. If someone will try to change that, it will be very easy to tell that from the code, and reject their contribution.
However, if someone will break one of the maps, and it won't longer contain any bus icons, it would be infeasible to know without cloning their branch, executing the code and manually go over each page of the application.
Therefore, testing the existence of bus icon in every page would provide us more value.
That's my opinion. What do you think?
from open-bus-map-search.
I strongly appreciate your detailed response. Thanks a bunch!
I agree with your point about the ordering of the menu items.
I would like to work on a better test scenario.
Could you please assign (or create) an issue which I can write tests for?
Happy to work on Unit Tests, Integration tests, or e2e Tests.
from open-bus-map-search.
Related Issues (20)
- חיפוש נסיעות לפי מספר לוחית רישוי HOT 6
- Can't put 17א where I'm advised to put 17א HOT 1
- Change of dates make line data disappear HOT 9
- Add a map to the line profile page
- Visualize data about a bus-line HOT 13
- We don't always see the planned route - why? HOT 8
- Wrong line profile information HOT 1
- Dark mode hides map legends HOT 3
- add youtube videos HOT 6
- no scrolling on live map preview HOT 10
- היסטוריית נסיעות לא עובדת HOT 4
- Embed youtube playlist to our about page HOT 3
- Change the title of the "realtime" page HOT 3
- Make the language button visible and visually pleasant HOT 6
- Redesign Proposal HOT 7
- Dashboard data isn't cached
- center map automatically HOT 2
- Create MapContent Component HOT 2
- Make us SEO compatible HOT 9
- עעעע HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open-bus-map-search.