33

Yes that is the ideal situation for Unit tests To look at a different situation - if you are writing software that will not be changed in the future then perhaps you could consider skipping the tests. I have yet to work with such software of course :) Also TDD and BDD proponents would argue that even in those cases you should still use those techniques. ...


27

Main observations in unstable scripts are as follows: Selenium tests are usually unstable because of the unnecessary complexity created in your test framework Enabling parallel execution without keeping in mind that one test may affect the state of the system that in turn affect the other test running in parallel. Using deprecated modules Incorrect ...


15

Yes, the idea of writing the right form of unit-tests is that it keeps the cost of change low. If you make a lot of changes they are here to help you go faster. The biggest mistake most people make is too test implementation instead of behavior, which increases the cost of change, because you build change detectors. The tests should help you refactor the ...


12

You should always pick tests carefully when it comes to test automation. :) One of the reasons, as you said, is overlap (and with that, execution time and robustness). An example to clarify: Your API has 10 endpoints which might return several different error messages each. Don't test each error as a UI test: this will take up lots of runtime and will also ...


9

I recommend One set of tests You've clearly defined a common problem that many of us face. I have tried all of the solutions you outlined but they all seem to run into the issue of a lot of maintenance and knowledge and updating code based on environment. My recommendation is one set of tests. If there are dependencies, e.g. database you create a connection ...


8

In our last project we also evaluated different tools among these were also Cypress and Selenium. At the end we decided for Selenium, because we were testing front end applications and for us Cross-Browser testing was one of the most important reasons, why we made the decision for selenium. Furthermore our test management had the requirement to integrate one ...


7

Probably not, mainly because: WebDriver is a W3C Spec WebDriver supports all major programming languages WebDriver is supported by all major browser vendors WebDriver is 100% open-source Cypress has commercial owners and for example "Test parallelization" is not in their open-source offering. Cypress is JavaScript only, which is not everyones cup-of-tea ...


6

Don't track and link stories to tests this way. It will lead to a massive mess. Treat your automation itself as the product. Use the Agile principle of working software (automation in this case) over comprehensive documentation such as detailed stories and links. Reset. Separate your tests from your stories. Create a test suite. Use test suites to ...


6

Yes. Because those bits that do not change still need testing. The rest that does change, well, that's just a part of the process, you simply need to change things once in a while. Writing tests makes you think about the whole problem, which is alone a good practice to do. Without tests, problems might remain in the product until later, which might be then ...


6

There is no concept of overlapping testcases in different test levels, Both are completely isolated Just because API works fine you cannot guarantee UI works fine. Imagine all your API tests passing but user not able to use the UI , Imagine all your UI working due to cached information but actual backend is failing. Ensure more low level coverage like unit ...


6

The more tests are integrated, the less stable they are. This is because they involve many more environmental factors. Basically, Selenium tests are not just integrated in terms of software components which compose your AUT, but also in terms of the particular version of the OS, particular browser version, particular graphical driver version, or "...


5

It really depends on what you need. I've used both, so here's my opinion: Cypress seems better at handling waits (your point n. 2), this could be such a pain in other tools, but it's an internal part of Cypress, which usually makes you write tests faster and the tests tend to be a bit more stable. Selenium is almost always used with some programming/...


5

Try the following: Click the "lock" icon near the URL in address bar Click "Certificate" Switch to "Details" tab Click "Copy to File..." button Follow the wizard steps. Save the cert to some file in X.509 format In file explorer right click that certificate file and choose "Install Certificate" Follow the steps of import wizard so that your certificate is ...


5

The first question to ask yourself is if this level of traceability is necessary. For some people, maybe the answer is yes. For others, perhaps not. If you don't need traceability between story and test, you can focus on better ways to measure test coverage and correctness. The second question to ask is how you intend to implement automation. There are ...


5

I wouldn't say that MVC architecture implies some specific structure of UI tests. In web applications the controllers are usually the components which process requests from the client. Those controllers are not necessarily related to any solid feature but they might serve for many features simultaneously (for example the controller that processes AJAX calls ...


5

You're definitely on the right track here. I would start by collecting actual requests and responses generated by the live system, then anonymize as needed. These would be the seeds of your tests, since they would have the correct format. They should be available in your application logs, although you may have to do this by using the web application to make ...


5

There needs to be little more clarity on how the team currently works and what they expect to be working as. By reading the question it looks like the current Test strategy is like : Huge drawback of this implementation: This takes away the basic pillar of microservice architecture, this test creates a dependency between microservices. You will not be able ...


5

I don't think there's a special name for this particular situation. Nor do I think we should create one. I think we should try to keep things simple, rather than layer more artificial names of top of what we currently use. We have established automated tests but it is not uncommon for them to fail against qa. (we can fix them later, but different ones ...


5

Accessibility testing (a11y) is an important part of testing any application. In my experience, it's not done often enough, although more and more companies are getting involved here given legal issues that have cropped up in the last couple of years. Like anything else that is designed by UX or developed by Developers, a11y needs to be tested. Structure: If ...


4

Assume that you're working on a project that requires testing on multiple configurations. What are you going to do? Running different scripts on each and every device is cumbersome. Automation Testing will help you save time and manual efforts. As an automation tester, you should know about Selenium grid. This is exactly why Selenium Grid is built. It can ...


4

In Cucumber 5.7.0 the support of tags is handled in different way so that expression(infix boolean expression) can also be used in the same way. You can pass the multiple tags like @CucumberOptions(tags = "@smoke and @positive") public class RunCucumberTest {} Another way to manage the tags by JVM System Property mvn test -Dcucumber.filter.tags="@smoke ...


4

In addition to what the other answers have said, I would say the interviewer is looking for how you, as a new addition to a team, would deal with a no-win situation. Frankly, I'd suspect that- at minimum - the company has found itself in this kind of situation in the past. At worst (I freely admit that I'm cynical) something similar is going to be facing ...


4

Get the text and add to a array Convert array to set and compare the size Set will have only unique elements (Removes the duplicates) So if length of set and array are different , it means there where duplicate entries in the array. var arr = [55, 44, 65, 55]; var set = new Set(arr); console.log(set.size === arr.length); set.forEach(x => {console.log(x)});...


4

What you're describing is mentioned here in the Cypress documentation. Cypress documentation also mentiones some workarounds. I think the bottom line for you is this part: A common use case for this is Single sign-on (SSO). In that situation you may POST to a different server and are redirected elsewhere (typically with the session token in the URL). If ...


4

You test micro services the same way you test all software, with Unit, Integrated and UI tests. As PDHide details nicely, a key part of micro-services is that they give you the ability to perform unit and integrated testing without all the dependencies that traditional testing would require. It is up to quality software engineers to both recognize and ...


4

I think you got your base assumption wrong, DevOps is not a silo skill and profession that you either have or not, belong to or don't. Knowing how to use AWS cloud, Docker, Kubernates or Google cloud is something you will use as a test engineer even before you start developing automation. Is it mandatory ? obviously not, but you and your career will greatly ...


4

First understand virtualization concepts: Your code runs on a system. In the past, we used to buy bare metals for each isolated code. Meaning if you want two servers you buy two servers. so if a code requires only 1G RAM, but the server you have is 32GB you are wasting remaining 31GB of hardware resource. To avoid this wastage the hardware virtualization ...


4

Salary hike is not just about what you think you have provided. You have to ask the following questions to the situation. Can organization hire more experienced talent with much more expertise in test automation for the same salary. Were you able to showcase the addons brought by test automation by using proper metrics like reduced testing time, faster ...


4

Although I don't have a complete answer this question is special, the difference from the common "how do I test" questions is the high frequency of changes. Testing everything thoroughly is one approach, but as @vicky99 explained it's not worth investment for a very short lived feature. There two approaches to go as I see it. One approach that ...


4

const playwright = require('playwright'); (async () => { const browser = await playwright["chromium"].launch({ headless: false}); const context = await browser.newContext(); const page = await context.newPage(); await page.goto('http://www.google.com/'); await page.screenshot({ path: `example-chromium.png` }); locator ...


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