integration-testing

Running docker-container tests on circleCI

拜拜、爱过 提交于 2020-01-01 19:31:24
问题 I have created some integration tests for my open-sourced code and I am looking for a publicly accessible CI service to host them. As Travis-CI has to small quotas for all my containers, I think I will use CircleCI. This is my cirle.yml : machine: services: - docker dependencies: override: - pip install docker-compose test: override: - cd integration-tests && docker-compose run --rm runner However after running this I get error message "client and server don't have same version (client : 1.18

In-container testing vs. mock objects for integration testing

五迷三道 提交于 2020-01-01 12:30:40
问题 In-container testing is often opposed to testing with mock objects. However, as mock objects simply mimic the behavior of the real objects, isn't the in-container testing the only way to really test the system in its' real environment? As an partial alternative to in-container testing and mock objects, Spring provides the TestContext framework that initializes Spring nicely without needing to start up the actual application container (web application server, in my case). However, this is

Test Environment.Exit() in C#

天大地大妈咪最大 提交于 2020-01-01 10:53:06
问题 Is there in C# some kind of equivalent of ExpectedSystemExit in Java? I have an exit in my code and would really like to be able to test it. The only thing I found in C# is a not really nice workaround. Example Code public void CheckRights() { if(!service.UserHasRights()) { Environment.Exit(1); } } Test Code [TestMethod] public void TestCheckRightsWithoutRights() { MyService service = ... service.UserHasRights().Returns(false); ??? } I am using the VS framework for testing (+ NSubstitute for

Create LocalDB for testing from Visual Studio SQL project

限于喜欢 提交于 2020-01-01 09:40:50
问题 I'm trying to create an integration tests for my project. I need to test a controller that makes call to stored procedure through repository. An empty database should be created on each runs of certain scope of tests. So I'm going to implement the following steps: Create LocalDB Run some Pre-scripts(to add test data) Run test Run some Post-scripts (if needed to run other test on this database) Remove LocalDB In my solution I have .sqlproj with all tables and SPs. How can I create LocalDB with

Integration testing: Mock external API vs. use external API sandbox

依然范特西╮ 提交于 2020-01-01 02:36:10
问题 We're required to use the API of an external partner. The API is in a good shape and we got access to a sandbox environment we can use for automatic testing. We already test every single call of the external API using unit tests but are unsure regarding best practices for integration tests when it comes to complex operations on the side of the external partner. Example: Every user of our service also got a user object at our external partner. When performing external API call X on this user

Usability of Protractor outside of AngularJS

纵然是瞬间 提交于 2020-01-01 00:58:26
问题 So I have recently switched from using AngularJS to ReactJS but I did really like working with the Protractor E2E test runner so I was wondering 2 things about Protractor. Are there any major issues with using Protractor on a site that does not use AngularJS at all? I know that Protractor by default tries to synchronous with Angular and you get the: Error: Angular could not be found on the page X : retries looking for angular exceeded type message however I believe that can be prevented by

Integration testing frameworks for testing a distributed system?

我的梦境 提交于 2019-12-31 13:14:53
问题 I have a distributed system with components spread across multiple boxes. They talk to each other using tcp or multicast. Each components interchanges messages with each other - these are basically data structures that get serialized. What integration test frameworks do we have for testing systems like these? I am familiar with ruby so something ruby based would definitely help. 回答1: I suppose there are different ways of doing it. I try to avoid integration testing as much as I can but at

Integration testing frameworks for testing a distributed system?

大憨熊 提交于 2019-12-31 13:14:22
问题 I have a distributed system with components spread across multiple boxes. They talk to each other using tcp or multicast. Each components interchanges messages with each other - these are basically data structures that get serialized. What integration test frameworks do we have for testing systems like these? I am familiar with ruby so something ruby based would definitely help. 回答1: I suppose there are different ways of doing it. I try to avoid integration testing as much as I can but at

How to rollback nested transactions with Propagation.REQUIRES_NEW in integration tests

丶灬走出姿态 提交于 2019-12-31 10:33:09
问题 I have several integration tests for various services that extend the following baseclass: @ContextConfiguration(locations="classpath:applicationContext-test.xml") @TransactionConfiguration(transactionManager="txManager", defaultRollback=true) @Transactional public abstract class IntegrationTestBase extends AbstractTransactionalJUnit4SpringContextTests { //Some setup, filling test data to a HSQLDB-database etc } For most cases this works fine, but I have a service class which has transactions

Whats a great way to perfom integration testing?

断了今生、忘了曾经 提交于 2019-12-31 10:04:14
问题 We have written our own integration test harness where we can write a number of "operations" or tests, such as "GenerateOrders". We have a number of parameters we can use to configure the tests (such as the number of orders). We then write a second operation to confirm the test has passed/Failed (i.e. there are(nt) orders). The tool is used for Integration Testing Data generation End-to-end testing (By mixing and matching a number of tests) It seems to work well, however requires development