4

The id global attribute defines an identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS). https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id So as per standard, ID should be unique across the entire page ( Even ...


4

Yes, this is typically done in a commercial context, but it does not need to be exactly as described. As you already noticed, developers should write unit tests. Those tests as you probably know only test the smallest distinguishable things in the code. Higher up there should be integration tests - either as an extension to the unit tests or maybe in the ...


3

It depends, both paths back-end and front-end have their testing challenges. I would start with front-end, because understanding the basics of a web-application is very useful when when creating end-2-end UI-automation tests with for example Selenium/WebDriver. As Selenium/WebDriver is the facto standard this makes this most sense from a career perspective. ...


3

I have worked with a couple of JavaScript front-end frameworks (Angular, Ember and React) an all of them have their own tools to write (whitebox) tests. The (included) test frameworks let you render the components in isolation letting you verify their behaviour without the need of a browser. Letting you write unit like tests, but also integration tests. ...


3

why companies would have both API tests and web tests when this causes duplication of effort. In short, because those tests are different in nature, help discover different types of bugs and have different properties. End-to-end tests, e.g., tests operating on UI level of a Web application have two main advantages: they simulate a real user: this helps ...


2

This would mostly be up to the team or requirements for this website. Some use unique id,'s, some don't, some don't even use id's for all webelements. Since this does indeed make automation harder, you could have a meeting with the devs or team in general to discuss this and work out how important this is in the overall scope of the project.


2

Here: if(cy.get('a.auth0-lock-alternative-link').contains('Not your account?')) { cy.get('a.auth0-lock-alternative-link').contains('Not your account?').click(); } to evaluate expression in if statement you call contains('Not your account?') method. Since contains method has the default assertion that makes your test fail once the element does not contain ...


1

My answer would probably be a question: What are the risks involved in the application? The minimum number of tests would greatly depend on these risks. I think most risks are not covered by minimal path coverage. Like Joao said, adding infrastructure to the test mix could explode the number of test cases. Which might be worth it if people could die based on ...


1

You can use state transition logic , here each form has two actions , one is save and another is goto next And this form is available across two interface (web and Mobile) So there can be the list 12 test cases (Total forms or state * Total action) * Total interface =( 3 * 2 ) * 2 = 12 Here i consider transiting to next state involve testing of that state ...


1

"What is the minimal number of tests to cover the functionality" is not an answerable question. You said "a user must complete all 3 steps" and then you said "user can X", "user can Y" - however, the type of question you should ask is "will the user do X?". This is a more profound question that cannot be ...


1

Liquid includes this functionality by default, Liquid also comes with a stricter parser that can be used when editing templates to give better error messages when templates are invalid. Source: https://github.com/Shopify/liquid#error-modes Update Liquid is an open-source template language created by Shopify and written in Ruby. Source: https://...


1

Since you cannot leverage the testing tools of modern framework, such as React or Ember, I would suggest the following: Focus on application level checks: Using Selenium, most widespread. Example here: driver.get("http://www.google.com"); WebElement element = driver.findElement(By.name("q")); element.sendKeys("TestingBot"); element.submit(); Or using ...


1

I advise our teams to write mainly unit-tests, but at least ONE test on service (e.g. API) and UI (e.g. end-to-end) levels of the test-pyramid. Just a happy path test is sufficient. Why do I advice that? The main reason is to make sure that each level is build testable. If the levels are testable, then when a defect occurs and after it is fixed, it should ...


1

Front end testing is important and is often part of User Acceptance testing. The most popular approaches uses Selenium along with a programming language - Java, Ruby, Python or C# The basic principle is that you create an instance of a Selenium object called 'WebDriver' that represents the instance of use of a specific browser, for example chromedriver for ...


Only top voted, non community-wiki answers of a minimum length are eligible