How to use Selecium on Angular App for integration test [closed]
I am new in the world of testing.
I would like to test e2e my front-end part (Back : Spring Boot, Front : Angular 11).
I have a lot of questions :
- Is Selenium & Protractor are the same ?
- How to set up Selenium on my Angular App ?
I read a lot of article and for angular app many developers are using Protractor or Cypress.
In my project, I must use Selenium, I don't know what to do :(
I would like a clear explanation about testing Angular App (not AngularJs) using Selenium.
Advance Thanks,
Solution 1:
Q. Is Selenium & Protractor are the same ?
Ans: No, they are not.
Protractor is an end-to-end test framework
for Angular and AngularJS applications
. Protractor
runs tests against your application running in a real browser
, interacting with it as a user would.
Whereas Selenium:
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
Primarily it is for automating web applications for testing purposes but is certainly not limited to just that.
Q. How to set up Selenium on my Angular App?
Ans: Since you've mentioned that selenium is must for you to use.
I would say first determine the binding language first, it could be:
- Java
- Python
- Javascript
- Ruby
- VBA
etc. understand that you can integrate your selenium script to any binding language of your choice (also depends on your company, policy, etc.)
Conclusion:
You can use any one of them based on your need/requirement/knowledge, but Protractor
is a framework where as Selenium is just a functional tool.
Also, Selenium
has large user support than Protractor
Link