integration-testing

How do startup companies add new features to their product while it's live? [closed]

强颜欢笑 提交于 2019-12-08 13:35:32
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . How do startups like say Feedly, or Buffer make changes to their code, by adding a new feature and at the same time testing it out without breaking things? Is there a framework for sandboxing, does it have to be built in house, or is it just cloning the git repo on a localhost and

Setting up multiple Docker containers and MongoDB to run in CircleCI

孤街浪徒 提交于 2019-12-08 05:01:29
问题 I'm trying to setup a continuous integration flow for a group of several Rails service apps I have that communicate with each other through endpoints. The idea is to configure CircleCI so that when the test flow is triggered, it will pull down preconfigured Docker images for each of the apps, start Docker containers for each one, and then run a test suite that tests that the full-flow integration works from one app through the other. One of the service apps uses MongoDB, so it needs to also

Why i can not get current_user while writing test case with Rspec and Capybara

两盒软妹~` 提交于 2019-12-08 04:59:03
问题 I have to write integration test case for my one feature listing page and that feature index method has code like below def index @food_categories = current_user.food_categories end Now when i try to write a test case for this it throws an error 'undefined method features for nil class' because it can not get the current user Now what i have do is below I have write the login process in the before each statement and then write the test case for the features listing page Can you please let me

How to redirect redirect mock requests in Spring MVC REST test?

半城伤御伤魂 提交于 2019-12-08 03:54:52
问题 In my web.xml I mapped the servlet to /api like this: <servlet-mapping> <servlet-name>todo</servlet-name> <url-pattern>/api/*</url-pattern> </servlet-mapping> <servlet> <servlet-name>todo</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> So for the controller using @RequestMapping(value = "/todo", method = RequestMethod.GET) , it actually gets mapped to "/api/todo" But in test when I call mockMvc

How to test a client of a WCF service

可紊 提交于 2019-12-08 03:11:58
问题 I have a WCF service that exposes 1 method GetNextObjectInList(int id) which hits a DB. The WCF service works, more or less, like this: public class MyService : IDisposable { public MyService() { this.IntializeDBConnection(); } public int GetNextObjectInList(int id) { /* uses DB connection */ } /* Dispose releases DB connection */ } This makes the client code relatively simple: public void UseNextElementInList() { IMyService svc = new MyServiceClient(); int nextID = svc.GetNextObjectInList

How to add FormsAuthentication cookie to HttpClient HttpRequestMessage

爱⌒轻易说出口 提交于 2019-12-08 02:53:41
问题 I am trying to authenticate inside integration test by calling FormsAuthentication.SetAuthCookie("someUser", false); After that I do need to call WebAPI and not receive unauthorized exception because I have authorized attribute applied. I am using this code to create auth cookie : var cookie = FormsAuthentication.GetAuthCookie(name, rememberMe); var ticket = FormsAuthentication.Decrypt(cookie.Value); var newTicket = new FormsAuthenticationTicket(ticket.Version, ticket.Name, ticket.IssueDate,

Reset Spring-Boot During Integration Tests

混江龙づ霸主 提交于 2019-12-07 20:22:34
问题 I guess am trying to get a corner case to work here. In my current project there are about 20 integration tests. One new integration test requires @EnableAsync to make the test work: @RunWith(SpringRunner.class) @EnableAsync @SpringBootTest(webEnvironment = WebEnvironment.NONE) public class MyITest { : } When run alone, this test works fine. Considering Maven and Eclipse' execution of tests in one project and knowing that the environment is only created once and reused (or soft-reset) for all

How to redirect redirect mock requests in Spring MVC REST test?

巧了我就是萌 提交于 2019-12-07 18:34:27
In my web.xml I mapped the servlet to /api like this: <servlet-mapping> <servlet-name>todo</servlet-name> <url-pattern>/api/*</url-pattern> </servlet-mapping> <servlet> <servlet-name>todo</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> So for the controller using @RequestMapping(value = "/todo", method = RequestMethod.GET) , it actually gets mapped to "/api/todo" But in test when I call mockMvc.perform(get("/api/todo/")) I got a 404. I have to call get("/todo/") to get the correct mapping in test. I

rails Devise authenticated routes in integration test

心已入冬 提交于 2019-12-07 17:31:41
问题 I want to test every route in an application, and learned I should do that in an integration test: Where to test routes in ruby on rails However I'm getting the following error: NoMethodError: undefined method `authenticate?' for nil:NilClass /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/devise-2.1.2/lib/devise/rails/routes.rb:286:in `block in authenticated' It's well-mentioned online that you can't use Devise::TestHelpers in integration testing -- Devise Google Group, Devise

How to inject fake, stubbed or mock dependencies for Integration tests using Typhoon

别来无恙 提交于 2019-12-07 13:54:48
问题 I'm trying to write integration tests using KIF. My question is: How to inject stubbed, mock or fake dependency for particular view controller? Each view controller using dependencies like a data model, http client, store manager etc. comes from ModelAssembly, ApplicationAssembly, ManagerAssmebly. On storyboard, for login view i have a key path, containing value "loginViewController". Creating view controllers: ViewControllersAssembly.h @interface ViewControllersAssembly : TyphoonAssembly