Move cypress folder from the root of the project

Cypress has a few configuration options to specify custom folder structure. For that you will need to have cypress.json file in the root of your project and specify the following structure there for cypress to properly pick up the files in test/cypress/: { “fixturesFolder”: “test/cypress/fixtures”, “integrationFolder”: “test/cypress/integration”, “pluginsFile”: “test/cypress/plugins/index.js”, “screenshotsFolder”: “test/cypress/screenshots”, “videosFolder”: “test/cypress/videos”, “downloadsFolder”: “test/cypress/downloads”, … Read more

What are unit testing and integration testing, and what other types of testing should I know about?

Off the top of my head: Unit testing in the sense of “testing the smallest isolatable unit of an application”; this is typically a method or a class, depending on scale. Integration testing do these things talk to each other properly? Feature testing: this may cut across units, and is the focus of TDD. Black-box … Read more

Is there a convention to distinguish Python integration tests from unit tests?

In our project we have unit tests inside each package, same as your case, and integration tests ,system tests, as a separate package on top level, i.e: package_1/ __init__.py module_1.py module_n.py test/ __init__.py test_module_1.py test_module_n.py package_n/ __init__.py module_1.py module_n.py test/ __init__.py test_module_1.py test_module_n.py systemtest/ __init__.py systemtest_1.py systemtest_n.py I would use this convention even if you’ve … Read more

Cucumber and Capybara, clicking a non-link or button element

You can click on an element via Capybara::Element.click. I add the following for this in my web_steps.rb to click on divs. When /^(?:|I )click within “([^”]*)”$/ do |selector| find(selector).click end There is also Element.trigger(‘mouseover’) which appears to enable hover albeit not working with Selenium. It is also very likely you will need to decorate your … Read more

Configure @MockBean component before application start

In this case you need to configure mocks in a way we used to do it before @MockBean was introduced – by specifying manually a @Primary bean that will replace the original one in the context. @SpringBootTest class DemoApplicationTests { @TestConfiguration public static class TestConfig { @Bean @Primary public SystemTypeDetector mockSystemTypeDetector() { SystemTypeDetector std = … Read more

Running NUnit through Resharper 8 tests fail when crossing between projects due to AppDomain

The Workaround: Have you tried in Visual Studio going to ReSharper -> Options -> Tools -> Unit Testing Change the setting “Run up to 1 assemblies in parallel” to a higher number. I tried one for each test project. Max is number of cores, I think. Counterintuitive I know, but it worked for me and … Read more

Testing Snackbar show with Espresso

This worked for me, please try. onView(allOf(withId(android.support.design.R.id.snackbar_text), withText(“My text”))) .check(matches(isDisplayed())); If you use AndroidX, please use the following: onView(withId(com.google.android.material.R.id.snackbar_text)) .check(matches(withText(R.string.whatever_is_your_text)))