integration-testing

How to use docker-compose to restore fresh databases quickly for integration tests?

拟墨画扇 提交于 2019-12-11 17:16:22
问题 I would like to run integration and end-to-end tests with a database in a known state for each run, to make the tests independent and repeatable. An easy way of doing this is to use docker-compose to create a database container which loads the scheme and data from a dump file each time. However, this is far too slow to restore the database for every test. A better way seems to be to restore the database once in a docker container or volume, and then copy (mount?) the container/volume database

What are the problems with using Jax-RS instead of Cloud Endpoints on Google App Engine

徘徊边缘 提交于 2019-12-11 17:10:35
问题 I'm developing a java web project on Google App Engine/Datastore as a mobile app backend. The requirement is to only use services available for free for low usage in Google Cloud so that I can get started cheaply and (theoretically) have to do much less work to scale up to handle more users. I am a JavaEE developer and am considering using Jax-RS inside Google App Engine instead of Google Cloud Endpoints. Having read JAX-RS services in Google App Engine and some other answers, I am interested

Changing data for route in cypress test for QraphQL endpoint

感情迁移 提交于 2019-12-11 17:08:37
问题 I have an Angular application using QraphQL. I write a test in cypress, looking like this: it('should do something', () => { cy.server(); cy.route('POST', '/graphql', 'fixture:data1.json'); // data is loaded from the endpoint to populate the page cy.visit('http://localhost:3000/#/something/somethingElse'); // when the button is clicked, the same endpoint is called again, // but now I need it to deliver some other data. cy.get('button') .click(); }); Can anyone provide me with a way to set

Integration test is not running in development environment

亡梦爱人 提交于 2019-12-11 16:57:30
问题 I am new in ruby on rails and I want to write a simple test to check the login functionality of my system. I am following this official documentation http://guides.rubyonrails.org/testing.html#integration-testing I run the command rails test:integration but this is showing this error rails aborted! ActiveRecord::EnvironmentMismatchError: You are attempting to modify a database that was last run in `development` environment. You are running in `test` environment. If you are sure you want to

spring boot integration test (business layer)

时光总嘲笑我的痴心妄想 提交于 2019-12-11 16:00:04
问题 I'm trying to setup integration tests for the business layer of a spring boot application. The Unit-Tests work fine but integration tests don't work. Here's the basic setup: // entities @Entity Table(name="TOrder") public class JPAOrder... { } @Entity Table(name="TCustomer") public class JPACustomer... { } // Repository interfaces @Repository public interface OrderRepository extends CrudRepository<JPAOrder, Long> { ... } @Repository public interface CustomerRepository extends CrudRepository

How to inject dataSource to jUnit for Integration Testing in SpringFramework 2

给你一囗甜甜゛ 提交于 2019-12-11 15:39:36
问题 I have the following dataSource defined in my spring-beans.xml file which I use in order to connect in my remote database : <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3306/sample"/> <property name="username" value="root"/> <property name="password" value="root"/> </bean> I am building a couple of jUnit integration tests that I want

Open Workspace during integration testing for vscode extension

佐手、 提交于 2019-12-11 15:31:55
问题 I have a use case where I need to have a workspace open in the host environment for vscode testing. I want to know a function to open a default workspace and another function which I can use with await so that the testing function waits till a workspace is opened. 来源: https://stackoverflow.com/questions/54926105/open-workspace-during-integration-testing-for-vscode-extension

Sql Server Compact Limitations — design decision or work in progress?

。_饼干妹妹 提交于 2019-12-11 15:10:40
问题 I'm using Sql Server Compact for automated integration tests of our web application, which runs the latest version of Sql Server (large? uncondensed?). The idea was to use a more lightweight database to mimic our own, which would be easy to create and destroy for tests. I'm aware of the limitations that CE has in comparison to Sql Server, and am willing to work around these by either trying to avoid the features that aren't supported in CE or working around the tests for the areas of our app

frank build fails on ld command

老子叫甜甜 提交于 2019-12-11 15:08:33
问题 I'm following the tutorial recommended on the Frank-Cucumber website (http://blog.thepete.net/blog/2012/06/24/writing-your-first-frank-test/), but once executing frank build , the build fails saying: The following build commands failed: Ld Frank/frankified_build/2012\ Olympics.app/2012\ Olympics normal i386 (1 failure) This clang error is present around the previous ld call: clang: error: linker command failed with exit code 1 (use -v to see invocation) I'm using XCode 4.6.3, I have the

How can I write a shortcut for signing a user in in my integration tests?

百般思念 提交于 2019-12-11 14:49:48
问题 Motivated by the discussion in this question, I want to write a log-in method for my integration tests. In my test_helper.rb I even found such a method, but it is defined inside a ActiveSupport::TestCase class, and my test inherits from ActionDispatch::IntegrationTest . So I copied the method and put it (inside test_helper.rb ) into the ActionDispatch::IntegrationTest class. But it doesn't work and my tests fail with this message: Capybara::ExpectationNotMet: expected "data:," to include