integration-testing

Integration tests with RabbitMQ

倖福魔咒の 提交于 2019-12-11 08:07:27
问题 Currently i'm working on some Spring Boot 2.x application interacting w/ RabbitMQ. I'd like to create an integration test to test the whole app. logic, including interaction w/ Rabbit. So far i need a light-weight stand-alone implementation of AMQP standart to make Spring Boot work w/ it, including sending & receiving messages. I had a look at Qpid sample here but it needs RabbitMQ running somewhere what is not very good for my IT. Are there some another mature light-weight stand-alone AMQP

How to test Framework if Unit tests are in separate assembly?

不羁的心 提交于 2019-12-11 08:04:23
问题 I have assembly with my framework and assembly with tests. But I need to test internal classes or substitute some services. For example, - I need to test internal helper. - My framework read and analyze files created by other application. I create these files manually for tests. But I can't give it to my framework from separate assembly. I need to create mock for internal service to provide these files. 回答1: If You want Your internal classes to be visible to your tests You must make your test

Liquibase Diff Tool missing constraints

瘦欲@ 提交于 2019-12-11 06:38:31
问题 We are using with my company Liquibase's diff tool to check schema relevancy of our clients MySQL and Oracle databases automatically via jUNIT tests. For that point Liquibase is great. Our problem is that Liquibase seems to "miss" some Foreign Key renaming where other tools like SQL examiner or RedGate MySQL compare seem to find all the foreign key naming differences. This feature is very important for us whereas we need to keep exact schema consistency for maintenance operations (DROP

Debugging an Azure web role started with csrun.exe

徘徊边缘 提交于 2019-12-11 06:19:23
问题 I have a Visual Studio solution that has a cloud project with one web role (containing an ASP.NET MVC Web API). If I hit F5, the Azure emulator is started and I can debug the web role fine. I also have a test project that contains integration tests, to test the web api end to end. In the AssemblyInitialize operation, I use csrun.exe to deploy and start the Azure emulator like: "C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\csrun.exe" ..\..\..\..\Sources\Cfg.Mgp.Infrastructure.Cloud

Issue when test a Jersey rest service using powermock with Jersey Test + TestNg

我是研究僧i 提交于 2019-12-11 06:11:46
问题 A rest service using Jersey developed. Now I want to write some integration tests for this web service but since not every class being used from the web service is already implemented I need to mock some of them. For example I have the following class: public class ServiceA { public String getService() { return null; }} @Path("/myresource") public class ResourceController { @GET @Produces("text/plain") public String getIt() { ServiceA a = new ServiceA(); return a.getService(); }} Then i want

Building an integration test for an AspNetCore API that uses IdentityServer 4 for Auth

橙三吉。 提交于 2019-12-11 05:49:53
问题 I've built a simple AspNetCore 2.2 API that uses IdentityServer 4 to handle OAuth. It's working fine but I'd now like to add integration tests and recently discovered this. I used it to build some tests which all worked fine - as long as I didn't have the [Authorize] attribute on my controllers - but obviously that attribute needs to be there. I came across this stackoverflow question and from the answers given there I tried to put a test together but I'm still getting an Unauthorized

How to test approximate values in Fitnesse

二次信任 提交于 2019-12-11 04:48:59
问题 I'm using Fitnesse with FitSharp to run integration tests. I'm using the RowFixture to test a table of numerical results and need to be able to test an approximate value to about 3 decimal places. How can I achieve this? I read somewhere about using ~= but this does not appear to work on tables 回答1: Yes, the Slim Test System in FitNesse offers an approximately equals operator ( ~= ) as you point out but I agree that it is not available in fitSharp. Two possibilities to consider: First (though

How to mock springSecurityService in unit tests using grails

99封情书 提交于 2019-12-11 03:25:39
问题 I am using Spring security in my grails project. I have installed the spring-security-core plugin and spring-security-ui plugin. The domain classes I have used for Person and Authority are User and Role respectively As per project requirements, I have modified my User.groovy class and the code for the same is as below: class User { transient springSecurityService //Mandatory Fields String employeeId String firstName String lastName String password String emailId //Other Fields String

E2E Testing - WebdriverJS, Selenium and Jasmine

泄露秘密 提交于 2019-12-11 02:44:42
问题 OK so I have followed several slightly differing examples, as you can see in my commented code below. They all claim to work, but I cannot get it to do so. I'm using; - selenium-webdriver - jasmine-node-reporter-fix ( jasmine-node errors) So its quite a simple asynchronous test, opening Google and searching, then getting the page title. Problem; The page title returned is the Google homepage and not the search results page. (Browser ends up on the search results page). Code var webdriver =

Running a Test Suite of the same class but with different initial conditions

白昼怎懂夜的黑 提交于 2019-12-11 02:41:25
问题 In JUnit 4, I am looking to write a test suite that is made up of multiple flavors of the same test case, just with different initial conditions on each one. Here is an example: import java.io.File; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) @SuiteClasses({MultiInputClientServerIntegrationTest.NormalInput.class, MultiInputClientServerIntegrationTest.SimulationHashIssue.class}) public class