-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
End to end tests? #105
Comments
I think that would be an extremely welcome and good improvement to make -- we've a few times now had bugs pop up in console, and data go missing when there's garbage in the source spreadsheet, so anything that can edge-case-test automatically would be great |
I'm 100% here for this. I think we should quickly discuss what testing framework to use and would like a few other friends to weigh in. I don't have a preference. Also necessary to get it hooked into Netlify (assuming netlify can build and run tests like jenkins or other CI platforms.) |
I'm also in favor of this. We're able to crowd source things fairly well, so I would definitely start light. Just knowing that clicking on an item in the location bar goes to the thing on the map would be awesome and probably weed out some dumb javascript errors. I wonder if we'd want a fixed QA spread sheet behind this to avoid data errors failing a build...of course data model changes would then require changes in two places...classic e2e problem. |
There's a Cypress plugin for Netlify here: https://github.com/cypress-io/netlify-plugin-cypress. Seems like it would be a pretty safe option since its featured prominently on their marketing website. |
Cypress seems neat. When we were evaluating it for my day job we passed on it because of its lack of support for Safari or Internet explorer. Then again, might not be a huge deal - Cypress' CEO defends testing against a single browser
I think we would definitely want a fixed data set, otherwise our assertions would be pretty weak (check that any value exists vs check that this specific value exists). Yep, data model changes would break tests but I'd argue they kind of should, it is a bit annoying though I agree. |
@crhistianramirez true. They also have a zillion open issues right now: https://github.com/cypress-io/cypress/issues |
Are there any other recommendations? We might be able to get pretty far with something simple like Jest. I also saw a reference to Karma on the netlify docs. |
Hey all, I'm just catching up on this thread and this project. From what I can tell, Netlify doesn't really provide support for testing in CI. But that's alright; we can add Gitlab CI or CircleCI and get test runs in PRs. I'm kind of out of the loop on JS test runners, but Karma looks pretty nice. Just to clarify, do we want to be running automated tests in all four browsers that are in the PR template? |
@caseyhelbling Jest is more of a unit testing framework isn't it? Not that we shouldn't be writing unit tests as well but they serve slightly different functions. In my experience end to end tests seem to catch a lot more bugs as they simulate real user interactions. All that said unit tests are far simpler both to write and maintain/automate since they don't need a UI to interact with so maybe we decide to start there and add the more complex unit tests later on? |
Hey all, I spent some time looking at JS end-to-end testing tools, and have a bunch of notes below. Based on all of this, I'm inclined to go with https://webdriver.io/. It's Webdriver based, so it can run tests across a whole bunch of browsers and works with cloud testing services like Sauce Labs/BrowserStack (leaving the door open for testing on mobile). But it also seems to be easier to use and setup then something like Selenium. Gotta say, the ability to walk through the steps of a test in Cypress is pretty nice. If Cypress supported more browsers, or cloud testing services, I'd probably recommend that. Useful ResourcesCriteria
PossibilitiesCypress
Jest
TestCafe
Webdriver.io
|
OK, now that I've actually tried to use Webdrivers.io, I'm less inclined to go with that. It runs Java Selenium under the hood. Between that and some of the obtuse documentation, it's kind of a pain to get going. I tried out TestCafe, and that was soooo much easier to get started. |
I've started PR #140, which adds TestCafe and a test around opening and closing the Help/Info window. It would be nice to add tests that cover everything else in the template. It would also be nice to run tests in CI. My capacity to help out is going to be spotty over the week, and I don't want that to hold folks up from making progress on this. So I'm open to whatever folks want to do with PR #140 . |
@wbushey Thank you for taking the time to analyze those libraries! 🎉 I'll close this issue now that we've decided on a library and I'll create issues for completing the remaining test cases as well as figuring out how to wire this up with our CI/CD pipeline |
The pull request template defines various checks to complete to ensure you didn't break functionality. I was wondering if there was any interest in adding automated testing to run through those scenarios for us? I've used testcafe in the past and would be happy to add them myself.
The text was updated successfully, but these errors were encountered: