integration-testing

Parsing URL for querystring values with Selenium IDE

試著忘記壹切 提交于 2019-12-22 10:02:28
问题 I'm new to integration testing, but have had great success so far buiding up a suite of tests using Se:IDE. As I've been running my tests, it has occurred to me that I'm generating a substantial amount of data and I'd like to clean up after myself. Most of my tests involve creating a new 'page', and the id is available in the querystring. I'd like to have Se:IDE store a querystring value and pass it to another page that calls a delete method to tidy up after I have run my verifications. I see

Which is better for web testing? Record-Play automation or coding? [closed]

旧时模样 提交于 2019-12-22 08:52:16
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I am working on a new project and I wanted to know which automation tool is the best to use. Should I record-play or code? 回答1: I've worked a lot with the Selenium browser automation software packages, and I find that recording re-inforces the existing application design,

How to write integration test for asp.net web api

走远了吗. 提交于 2019-12-22 08:37:16
问题 I am busy design a web service with asp.net web api. And I want to start doing unit tests on each controller. here is my test class so far: [TestClass] public class MyDevicesControllerTest { [TestMethod] public void TestValidUser() { MyDeviceController controller = new MyDeviceController(); var result = controller.Get(); } [TestMethod] public void TestInvalidUser() { MyDeviceController controller = new MyDeviceController(); var result = controller.Get(); } } But my web service makes use of

Rails system test with capybara and headless selenium browser in Docker

◇◆丶佛笑我妖孽 提交于 2019-12-22 07:01:03
问题 TL;DR: Any idea about how to properly configure capybara to be able to drive a remote selenium browser in a docker container with default Rails minitest system test? I'm running Rails in a dockerized env.. Now I want to start some "system tests" but since I'm running inside Docker I come up with some issues. I'm using the default test suite (minitest?) with capybara and selenium-webdriver gems. I've already installed the chromedriver packet in the container using the following: RUN apt-get

Tests dependent on commonly used functionality with NUnit

喜你入骨 提交于 2019-12-22 06:48:03
问题 I have some initialization code to use my API. The initialization may fail and I´d like to test it in an NUnit test. After the initialization the API may be used. I´m testing the API too, but all my test methods will use the same, common, initialization code. What I would ideally like is if this behavior: The Initialization test is run. The other tests are run if [1] succeeded. In all cases where [1] will fail, so will all other tests. But the valuable information is that [1] fails. That's

@DirtiesContext tears context down after every cucumber test scenario, not class

倖福魔咒の 提交于 2019-12-22 05:58:12
问题 Integration test executed by cucumber tends to leave behind context that causes problems with subsequent tests. Obvious solution appeared to be Spring's @DirtiesContext , but instead of tearing down the context after all the cucumber features have been run, it does this after each and every scenario, thus making the test execution time rather lengthy. Tried also with @TestExecutionListeners , but no luck. @RunWith( SpringJUnit4ClassRunner.class ) @ContextConfiguration( classes = {

Android test coverage report for multi module app

别来无恙 提交于 2019-12-22 05:20:25
问题 We have a multi module application. Where we have 3 library projects and 1 launch project. module1 (Libraray) module2 (Libraray) depends on module1 module3 (Libraray)depends on module1 Launch (Does not have any source code its just a launcher for all lib)depends on module1 and module 2. In module1 we are accessing module 2 and module 3 classes using facade pattern. Due to that we need to write all the test cases in Launch project as we have access the to all the classes in launch project so

Grails integration tests and transactions

我怕爱的太早我们不能终老 提交于 2019-12-22 05:17:17
问题 I don't get why this integration test fails. I can get the test to pass by either removing the @Transactional(propagation = Propagation.REQUIRES_NEW) annotation above the service method, OR by setting transactional = false in the Integration Test I realize that the integration test itself is running in a transaction, and that's why I've got the annotation on the service method. class DbTests extends GrailsUnitTestCase { boolean transactional = true def customerService void

Invoke Dispose method on AutoFixture customization

我与影子孤独终老i 提交于 2019-12-22 05:04:48
问题 I'm using an AutoFixture customization to test a repository which access to a SQL Compact DB. Would be very helpful to me to delete this database as soon as the test is completed. Because the db is created in the customization constructor I think that the best place to delete it is in the dispose method. The code which I'm thinking is: internal class ProjectRepositoryCustomization : ICustomization { private readonly String _dbLocation; public ProjectRepositoryCustomization() { var

Spring Boot integration test responding with empty body - MockMvc

▼魔方 西西 提交于 2019-12-22 04:44:10
问题 I've seen similar questions to this, but I've yet to find a solution that works for me, so i'm posting it with hopefully enough details to resolve.. So I have the following class: @RunWith(SpringRunner.class) @SpringBootTest public class TestController { @Mock private Controller controller; private MockMvc mockMvc; @InjectMocks private SearchService service; @Before public void setUp(){ MockitoAnnotations.initMocks(this); this.mockMvc = MockMvcBuilders.standaloneSetup(controller)