integration-testing

Insert BLOB from a file into a sql script to embed H2 database

自闭症网瘾萝莉.ら 提交于 2019-12-24 08:12:00
问题 I'm creating a SQL script to create a new schema and insert some values to an embed H2 database for use with integration tests in a Spring Boot application. One of the values I need to insert is a BLOB field on the sql table. I've succesfully used the FILE_READ function as described here. INSERT INTO MY_TABLE(ID, NAME, LOGO) VALUES('1', 'test1', FILE_READ('C:/myproject/logo.png')); That function works well with full paths but I'm not been able to do that with relative paths. That doesn't work

Run TestFixtures in Order with NUnit

大兔子大兔子 提交于 2019-12-24 04:35:13
问题 I need to have ordered test fixtures in my NUnit c# Application. I have an example on how to run ordered test methods from this page, and I've tried to implement the same logic for test fixtures with the same methods provided in the example application. In our application a test fixture is separated for each class and each test fixture has one test method. Our latest attempt was to use a Parent Test Fixture which inherits from a class called: OrderedTestFixture (the same as in the example),

How to configure Dr. Watson to silently dump a crashing process without popping up any error dialog box?

假如想象 提交于 2019-12-24 03:50:39
问题 I would like to know if it is possible to configure Dr. Watson to silently dump a crashing process without popping up any error dialog box? We need this because I run a set of integration tests with some applications. We don't want the tests to be blocked by an error message box. We need a way to make Dr. Watson silent but still dump the image when the process crashes. Best, 回答1: Dr.Watson itself is silent by default. anyway, if you want to control the way Dr.Watson works, enter "drwtsn32.exe

In code vs in script data generation for integration tests [closed]

五迷三道 提交于 2019-12-24 02:55:08
问题 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 . This question is very likely to be an opinion based. Yet I'm sure that opinion backed up with solid arguments paves the way to sound decisions. I do like to generate DB state using Autofixture. I sincerely hate writing SQL scripts and then coding expectations 'magically'

Robolectric, Dagger and compile time $ModuleAdapter creation

限于喜欢 提交于 2019-12-24 02:38:07
问题 Following on from the other questions in my Android TDD series, I have managed to get as far as using Robolectric , Mockito , Maven and ABS to unit test my Android developments. Evidently, I am seemingly pushing my own knowledge boundaries but the Android CI dream is just too alluring. If you can assist with my next problem I would be very grateful, here it is; I am wanting to write an integration test case which takes my application's database from v1 to head. I am using Dagger for DI and to

How to show tests from another repository in GitLab CI

你。 提交于 2019-12-24 01:49:08
问题 So I have my project with it's unit tests and they show nicely as green or red circles when I do a merge request after I've configured the CI system in GitLab. But now I also have some integration tests, which reside in a separate repository (why you ask? because I have multiple micro-services that need to be tested together, and each has it's own repository). When I do a merge request on this integration tests' repository, they show nicely, but what I need it for those tests to show on the

Is it wise to defer unit-testing until integration tests pass in scenarios where behavior of a 3rd-party API is largely unknown?

孤街浪徒 提交于 2019-12-24 01:48:06
问题 I don't mean defer all unit-testing until an integration test passes. The unit tests I'm referring to are those that verify that the SUT interacts with the 3rd-party mystery API correctly. The rationale for deferring these unit tests is that they verify something that is unknown. If I don't know how the 3rd-party mystery API works, how can I even write a unit test to ensure that the SUT uses the 3rd-party API correctly? Only once some minimal integration tests pass do I actually know what

What are integration tests containing and how to set them up

主宰稳场 提交于 2019-12-24 01:16:28
问题 I’m currently learning about unit tests and integration testing and as I understood it, unit tests are used to test the logic of a specific class and integration tests are used to check the cooperation of multiple classes and libraries. But is it only used to test multiple classes and if they work together as expected, or is it also valid to access databases in an integration test? If so, what if the connection can‘t be established because of a server sided error, wouldn’t the tests fail,

Unit-Test, Integration test or problem in design?

为君一笑 提交于 2019-12-24 00:13:07
问题 I'm written my first unit-test and I think it is too dependent on other modules and I'm not sure whether it's because: It's a complex test I've actually written an integration test or I have a problem in my design I'll first say that although I have around 4 years of experience in development I never learned, nor were taught, automated testing. I've just finished a major change in our DAL implementation, with Hibernate, and a colleague of mine suggested I write unit-tests for the new parts.

Error during Failsafe integration test does not cause failed Maven build

社会主义新天地 提交于 2019-12-23 13:11:11
问题 I have Failsafe running a Selenium integration test. If one of my assertions in the test does not pass and the test fails, then the Maven build will fail as expected. However, if the test errors, the build finishes unexpectedly as a success (output below) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 14.075 sec <<< FAILURE! Results : Tests in error: test(uk.co.ned24.ExpandedIT) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------