While ReactJS homepage mentions clearly that Jest is the way to go about unit tests, it says nothing about higher level integration tests (or e2e, as they are called in Angular world).
I'm quite unfamiliar with testing actually. So what kind of tools can I use for this? I've heard about selenium, but it's a blurry picture for me.
You can use cypress. Cypress is most often compared to Selenium; however, Cypress is both fundamentally and architecturally different. Cypress is not constrained by the same restrictions as Selenium.
This enables you to write faster, easier and more reliable tests.
Related
I have some programming experience and want to switch to QA roles that suit my skills better, I have more knowledge of Java but some Python.
I am wondering if I should focus on Selenium that I have some knowledge of or Protractor or Cypress that are considered as the latest standards?
I am more of a front end guy as a developer.
Also, I generally use guru99, tutorialspoint or w3schools to get started. Any other great resources for free or less expensive for quick learning for these topics?
Will cloud upgrades affect this learning process?
Please advice.
Selenium is still the most wide used web UI automation tool, having a lot of tutorials for any level of experience etc. Also, once you know one tool, you will be able to learn other similar tools in the future easily. Also, Selenium supports and mainly used in programming languages you already know while the other tools you mentioned using JavaScript. So, I'd advice you to start (and then continue) with Selenium.
I think Protractor is being dropped by Angular in favor of Cypress.
Please see
The State of end-to-end testing with Angular
...we’ve decided to deprecate Protractor
and #cypress/schematic.
Component testing
Also consider that Cypress has first-class component testing (as well as e2e testing) which has better speed than e2e but better coverage than unit testing.
See Quickstart Angular
and Cypress Component Testing vs Angular Test Harness
One of the projects has automated several test cases in Cypress.
We are using TestCafe to Automate our test cases. We want to call some of the test written in Cypress from TestCafe.
These Cypress test create precondition data that we can use in TestCafe. These cypress test cases are complicated and perform bunch of actions. Also, it is not responsibility of our project to maintain those scenarios. So, there is no sense to automate these test again in Test Café. It will help us in reusing test cases. We tried various approaches
Schedule specific Pipeline in Cypress with those test cases. Trigger this Pipeline from TestCafe
Is there a better way to call specific Cypress test from TestCafe ?
To me, calling Cypress tests from TestCafe tests seems like less clean a way to do it.
I'd do it with pipelines as you hinted at in your question:
Run Cypress tests that set up what you need
If 1. succeeds, trigger TestCafe tests
This looks pretty straigforward to me, and it's perhaps what other people would expect as well, so you make lives of your colleagues easier :)
I've recently found and fallen in love with Cypress for e2e testing, much more so than Selenium, but there's a catch: our web app will actually be within jxbrowser, inside a java app. Whatever e2e framework we choose has to be able to run all the tests within jxbrowser inside of this embedded application (hence why we originally looked at selenium, because of the remote driver)
Is it possible to get this working? We absolutely need the embedded jxbrowser tests (Cots integration, can't get around it), and I'd hate to have to fall back to selenium.
I have a hard time figuring out how you actually do integration tests
Is it still automated test with JUnit, NUnit or whatever, or is it just using the program (it has a gui) an making sure that everything works?
You can refer what-kinds-of-tests-are-there and whats-the-difference-between-unit-functional-acceptance-and-integration-test
GUI testing can be listed in system testing, acceptance testing.
GUI test tool mostly depends on type of UI (Web/Desktop/Mobile). e.g. for web testing you can evaluate good open source tools like selenium.
I'm writing functional tests for a chrome app written entirely in javascript. I decided to use Cucumber and Selenium Webdriver and run the tests on chrome. Wrote Selenium code inside Cucumber step definitions and it works fine (I've only just begun though).
I see that I can do headless testing with capybara (or webrat) and I'm not interested in that. Is there anything else that I'd gain if I use capybara?
I recently had the same question. Capybara gives you a pretty nice DSL to interact with the DOM for one thing. Another big advantage is you can easily switch drivers. On my team, we constantly switch from the Chrome driver (desktop browser) to the iWedbDriver (mobile safari in iphone simulator).
Headless testing is generally a very good thing, since the tests run faster if they don't have to draw the browser window. If the tests run faster, then you'll run them more often. If you're not interested in that, you're making a big mistake.