integration-testing

testing ember.js apps with jasmine

早过忘川 提交于 2019-12-03 07:11:44
问题 Does anyone know of any resources, examples or tutorials about testing ember.js apps ? How do you test views ? There does not seem to be any extensive examples / information on this. 回答1: I can't propose an example how you can achieve that, but I have found a project which extensively uses Jasmine for their test: you should take a look at the ember-resource project on GitHub. It uses Jasmine for their tests, which are located in spec/javascripts. The project also has a Rakefile and

Making Rails tests aware of Rack middleware outside Rails's internal chain

白昼怎懂夜的黑 提交于 2019-12-03 07:08:16
问题 Context : an application uses a piece of Rack middleware that must be setup in config.ru, rather than Rails's internal Middleware chain. This is for reasons not relevant to this question. Question : how do I make my tests (functional and integration) aware of this middleware? I'll ellaborate with an example. Let's create a pristine Rails 3 app, using rack-rewrite for illustration purposes. # /config/initializers/example.rb Rails.application.middleware.insert 0, 'Rack::Rewrite' do r301 '/so',

Simulating the passing of time in unittesting

南楼画角 提交于 2019-12-03 06:57:54
问题 I've built a paywalled CMS + invoicing system for a client and I need to get more stringent with my testing. I keep all my data in a Django ORM and have a bunch of Celery tasks that run at different intervals that makes sure that new invoices and invoice reminders get sent and cuts of access when users don't pay their invoices. For example I'd like to be a able to run a test that: Creates a new user and generates an invoice for X days of access to the site Simulates the passing of X + 1 days,

Exactly what is integration testing - compared with unit

安稳与你 提交于 2019-12-03 06:34:40
问题 I am starting to use unit testing in my projects, and am writing tests that are testing at the method/function level. I understand this and it makes sense. But, what is integration testing? From what i read it moves the scope of testing up to test larger features of an application. This implies that I write a new test suite to test larger things such as (on an e-commerce site) checkout functionality, user login functionality, basket functionality. So here i would have 3 integration tests

How to write integration and system tests in Asp.net MVC

心不动则不痛 提交于 2019-12-03 06:29:00
My application I have an application design that looks like this: web application layer - asp.net MVC app with controllers and views that use POCOs and call services service layer - business processes that use POCOs and call repositories data layer - repositories that use POCOs and communicate with the model in the form of EF model which is part of this same layer POCO layer - defines all classes that are used for inter communication between these layers So my data layer is completely transparent to data model implementation because upper layer don't use data entities at all. Testing As much

How to mock request and response in nodejs to test middleware/controllers?

烈酒焚心 提交于 2019-12-03 06:23:00
问题 My application has several layers: middleware, controllers, managers. Controllers interface is identical to middlewares one: (req, res, next). So my question is: how can I test my controllers without starting the server and sending 'real' requests to localhost. What I want to do is to create request, response instances as nodejs does and then just call controllers method. Something like this: var req = new Request() var res = new Response() var next = function(err) {console.log('lala')}

Integration testing: Mock external API vs. use external API sandbox

我的未来我决定 提交于 2019-12-03 06:22:42
We're required to use the API of an external partner. The API is in a good shape and we got access to a sandbox environment we can use for automatic testing. We already test every single call of the external API using unit tests but are unsure regarding best practices for integration tests when it comes to complex operations on the side of the external partner. Example: Every user of our service also got a user object at our external partner. When performing external API call X on this user object, we expect object Y to appear inside collection Z of this user (which we have to query using a

Integration tests for Google App Engine (java)

老子叫甜甜 提交于 2019-12-03 06:20:12
I'm trying to develop some effective integration tests for my GAE/j application. I'm familiar with https://developers.google.com/appengine/docs/java/tools/localunittesting -- these tools are great for small unit tests. I'm now interested in developing integration tests that test actual web requests. For example, I'd like to test that web.xml is mapping servlets and filters to the expected URLs and test that my JSPs generate what I expect. My aim was to bring up a local development server inside the JVM, which I could fire requests against. I'm open to other integration strategies, though; as I

Integration Test of REST APIs with Code Coverage

点点圈 提交于 2019-12-03 05:54:45
问题 We have built a REST API that exposes bunch of business services - a business service may invoke other platform/utility services to perform database read and writes, to perform service authorization etc. We have deployed these services as WAR files in Tomcat. We want to test this whole setup using a integration test suite which we would like to also treat as regression test suite. What would be a good approach to perform integration testing on this and any tools that can speed up the

Capybara doesn't recognize dynamically added DOM elements?

耗尽温柔 提交于 2019-12-03 05:53:30
问题 I seem to be having trouble testing the slick javascript things I do with jQuery when using Capybara and Selenium. The expected behavior is for a form to be dynamically generated when a user clicks on the link "add resource". Capybara will be able to click the link, but fails to recognize the new form elements (i.e. "resource[name]"). Is there a way to reload the DOM for Capybara, or is there some element of this gem that I just haven't learned of yet? Thanks in advance! ==Edit== Currently