integration-testing

ASP.NET Core UseSetting from integration test

牧云@^-^@ 提交于 2019-12-23 12:49:13
问题 I have an integration tests project that uses .UseSetting() in the test class, as follows: public AccessTokenRetrieval() : base(nameof(AccessTokenRetrieval)) { var connectionString = GetConnectionString(); var dbSettings = new DbSettings(connectionString); _userGroupRepository = new UserGroupRepository(dbSettings); _roleRepository = new RoleRepository(dbSettings); _userRepository = new UserRepository(dbSettings); _server = new TestServer(new WebHostBuilder() .UseStartup<Startup>()

Unit/integration testing Asterisk configuration

廉价感情. 提交于 2019-12-23 10:03:49
问题 Unit and integration testing is usually performed as part of a development process, of course. I'm looking for ways to use this methodology in configuration of an existing system, in this case the Asterisk soft PBX. In the case of Asterisk, the configuration file is as much a programming language as anything else, complete with loops, jumps, conditionals, etc., and can get quite complex. Changes to the configuration often suffers from the same problems as changes to a complex software product

Technique for using AutoFixture to integration test an application using Castle Windsor

时光毁灭记忆、已成空白 提交于 2019-12-23 09:38:31
问题 I'm new to AutoFixture, so I don't know if the following idea is going to make sense or be a reasonable thing to do. I've got an application that I'm in charge of integration testing , and it makes heavy use of Castle Windsor. To simplify dependency management and make my tests more like the application code, I've been building the Windsor container in my test initialize method and the using container.Resolve to instantiate the code I'm testing. I'd like to move away from that approach since

JaCoCo: missing classes directory

 ̄綄美尐妖づ 提交于 2019-12-23 09:34:05
问题 I am fairly new to JaCoCo and I am having trouble generating my code coverage report. This is my project structure: My integration tests live within the "...-integration-tests" module. When I build my project using mvn I get the following in my logging: [INFO] Skipping JaCoCo execution due to missing classes directory: ...-integration-tests\target\classes This is true because my compiled code is only available in the target>classes of the corresponding module. What is the best way to make

Ember testing: You have turned on testing mode, which disabled the run-loop's autorun

你离开我真会死。 提交于 2019-12-23 09:27:15
问题 I am trying to write a simple Ember integration test and continue to get the frustrating run loop error despite using Ember.run . I've had a nightmare of a time trying to get this to work, if anyone could help me I'd be so grateful. Specifically, I can see the test sign in and begin loading the next page (as it should), but as soon as the test finishes I get that error. This is regarding the second test, the first passes (as nothing is async I believe). import Ember from 'ember'; import

Integration testing Grails services with injection

元气小坏坏 提交于 2019-12-23 04:28:41
问题 I am having problems integration testing my Grails service because the service under test is not being injected in to my test. I have followed the advice from answers to questions else where on Stackoverflow but as yet can not get my service injected. The following class is under /<project_root>/test/integration/com/example : package com.example import grails.test.GrailsUnitTestCase class MyServiceIntegrationTest extends GroovyTestCase { MyService service; public void testService() { assert

comparing two REST services to each other

给你一囗甜甜゛ 提交于 2019-12-23 04:24:50
问题 Does anyone have any tips on writing tests that compare two REST services? We are doing this as a form of regression testing. I was hoping to do something along the lines of: send a GET for "/1" to both services and compare the results send a POST to both services, and compare the results send a PUT to both services, and compare the results The idea is that: every operation is sent to both services the results should be identical The REST services are written in Java/Jersey, so using that

Inject / override a properties value to a Spring Boot properties file in unit/integration tests phase

会有一股神秘感。 提交于 2019-12-23 03:25:10
问题 Working with Spring Boot and Testcontainers I need a way to dynamically tell the app what is the port in which the testcontainer is listening. I know that during tests I can tell Spring to use a different properties file: @TestPropertySource(locations = "classpath:application-integrationtests.yml") But since the port will be random, I need to programmatically inject the value to the Spring or to the properties file. I'm not talking about @Value parameter as it will inject to the bean a value

Integration testing of Relay containers with Jest against a working GraphQL backend not working

懵懂的女人 提交于 2019-12-23 01:36:24
问题 I'd like to implement the integration testing of my Relay containers against a running GraphQL backend server. I'm going to use Jest for this. I'd like to say that unit testing of React components works well as expected with my Jest setup. Here's what I have in the package.json for the Jest: "jest": { "moduleFileExtensions": [ "js", "jsx" ], "moduleDirectories": [ "node_modules", "src" ], "moduleNameMapper": { "^.+\\.(css|less)$": "<rootDir>/src/styleMock.js", "^.+\\.(gif|ttf|eot|svg|png)$":

database restore to particular state for testing

主宰稳场 提交于 2019-12-23 01:12:29
问题 We use an Oracle(or postgres) database and an application server to execute integration tests. To isolate each test from another one , the database schema is dropped and re-created before each test. As you see this is a time taking process. The application uses 100+ tables. We are thinking of writing custom sql to delete unwanted data from each tables. Is there a better way to save and restore database state? ( It appears DBUnit could do this, I have not tried it yet. ) A single test involves