integration-testing

How can I test my Bash script on older versions of Bash?

浪子不回头ぞ 提交于 2019-12-22 04:12:38
问题 I'm working on a Bash library and want to ensure I'm supporting as many environments as possible - including old installations of Bash. My development environment is Bash 4.3, but some of my users may well be running much older versions and presently I have no way to confirm or deny that my library will work for them. In particular I'd like to be compatible with OSX (which still ships with Bash 3.2, AFAIK). I know Bash can run in POSIX-compliant mode; is there a similar setting to disable

Ember Component Integration Tests: `link-to` href empty

大憨熊 提交于 2019-12-22 03:48:51
问题 I'm trying to write a component integration test, a la this blog post, but my component has a link-to to a dynamic route and the href property isn't being filled in. Here is a simplified version of what I'm trying to do. My component's template: {{#link-to "myModel" model}} And here is the relevant part of my test: this.set('model', { id: 'myId', name: 'My Name' }); this.render(hbs` {{my-component model=model}} `); assert.equal(this.$('a').attr('href'), '/myModel/myId'); // fails The link-to

Is unit testing needed in addition to integration testing of DB, filesystem, etc.?

旧巷老猫 提交于 2019-12-22 00:16:53
问题 At my office we have a dispute regarding the necessity of unit tests in addition to integration tests for the classes that have the main responsibility of interacting with a filesystem (DB, etc). The integration tests we have, are almost unit tests, as the tested object doesn't interact with other objects at all. The only reason, why we call the tests integration , is that the real filesystem is used in tests. And it is proposed to make the tested class use filesystem layer component, then

testing Angular async services with Jasmine

给你一囗甜甜゛ 提交于 2019-12-22 00:10:05
问题 I am trying to test a real http call with Jasmine (integration test), but when i call a method that uses $http.get, it times out and the server never gets called. I know that I am supposed to inject the implementation of $http but not sure where that should happen. searchSvc app.service('searchSvc', ['$http', '$q', searchSvc]); function searchSvc($http, $q) { return { search: function(text) { console.log('svc.search called with ', text); // this does get called return $q.when($http.get('

Writing integration tests against external resources which are A/B testing

喜你入骨 提交于 2019-12-21 21:29:56
问题 I have a bit of a design question and I'm curious if other users have run into this and how to develop the most elegant solution. I have some integration type feature tests in Cucumber using Capybara/Celerity/Selenium. A portion of these tests drive an external website to see how well my resources integrate (cookies, Javascript, etcetera). One particular external site is undergoing their own heavy A/B testing with a similar but significantly different site design, so my tests fail with the

Using different Spring properties for integration tests

怎甘沉沦 提交于 2019-12-21 17:55:52
问题 I am testing with Selenium a web application developed with Spring to check that the web application displays the right stuff for the user and that he's able to do everything that is in the specification. The other developers are using a fake Hibernate database in memory (HSQLDB) for unit testing. I have to use the real DB used by the program for testing, obviously. The JDBC parameters for the Spring application context are loaded by Spring at runtime (or compile time for building the WAR

Capybara visit method is not working

核能气质少年 提交于 2019-12-21 17:34:59
问题 I'm not sure what's going on, but I can't get simple tests to work because Capybara's visit method is not working for me. I've been trying to finish this railscast on testing. Once I get to the point where Capybara needs to visit the login page the test fails because it's only able to visit my root_url. Here's what the failure looks like. Note that it's failing because it can't even visit the login page. It's getting stuck on the homepage: Running: spec/requests/password_resets_spec.rb

MVC Integration tests with Unity IoC

瘦欲@ 提交于 2019-12-21 17:31:47
问题 Am trying Unity IoC, after using constructor based DI. Problem is trying to get integration tests working. http://patrick.lioi.net/2013/06/20/streamlined-integration-tests/ "Running your integration tests should exercise as much of the real system as is reasonably possible" Patrick above describes setting up an IoC inside the MVC Unit test project.. but I'm stuck as to how to implement public class HomeController : Controller { readonly IWinterDb db; // Unity knows that if IWinterDb interface

Java-written embedded Kerberos server for testing

谁都会走 提交于 2019-12-21 09:17:20
问题 is anyone aware of any embeddable Kerberos servers (KDC / KAdmin), which are written in Java and may run just within the JVM process (something like Hadoop minicluster or embedded LDAP servers)? My goal it to let people run integ tests requiring Kerberos authentication without having to install local kerberos server/configure remote server and connection to it. 回答1: You can give Apache Directory Server (http://directory.apache.org/) a try. It supports LDAP and Kerberos. See this example: http

Testing File uploads in Symfony2

妖精的绣舞 提交于 2019-12-21 07:06:09
问题 In the Symfony2 documentation it gives the simple example of: $client->request('POST', '/submit', array('name' => 'Fabien'), array('photo' => '/path/to/photo')); To simulate a file upload. However in all my tests I am getting nothing in the $request object in the app and nothing in the $_FILES array. Here is a simple WebTestCase which is failing. It is self contained and tests the request that the $client constructs based on the parameters you pass in. It's not testing the app. class