integration-testing

User Interface Testing

最后都变了- 提交于 2019-11-27 05:29:55
问题 We are working on a large project with a measure of new/modified GUI functionality. We've found in the past that we often introduced new problems in related code when adding new functionality. We have non-technical users perform testing, but they often miss parts and allow bugs to slip through. My question: Are there any best practices for organizing the UI testing of a WinForms project? Is there any way to automate it? Thanks! 回答1: There are GUI testing tools that will click buttons and

JUnit test report enrichment with JavaDoc

主宰稳场 提交于 2019-11-27 05:14:56
问题 For a customer we need to generate detailed test reports for integration tests which not only show, that everything is green, but also what the test did. My colleagues and I are lazy guys and we do not want to hack spreadsheets or text documents. For that, I think about a way to document the more complex integration tests with JavaDoc comments on each @Test annotated method and each test class. For the test guys it is a good help to see to which requirement, Jira ticket or whatever the test

AppSettings.json for Integration Test in ASP.NET Core

北慕城南 提交于 2019-11-27 03:49:22
问题 I am following this guide. I have a Startup in the API project that uses an appsettings.json configuration file. public class Startup { public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddEnvironmentVariables(); Configuration = builder.Build(); Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .ReadFrom.Configuration(Configuration)

Compile tests with SBT and package them to be run later

淺唱寂寞╮ 提交于 2019-11-27 03:29:49
问题 Im working with SBT and Play! Framework. Currently we have a commit stage in our pipeline where we publish to artifactory our binaries. The binaries are generated with the dist task. The pipeline then runs smoke and acceptance tests that are written in scala. They are run with sbt. What I want to do is to compile the smoke and acceptance tests as well as the binary and publish them to artifactory. That will allow the pipeline to download these binaries (the test suites) and run them, instead

How to run a single specific test case when using protractor

爷,独闯天下 提交于 2019-11-27 03:04:05
问题 I am using protractor for angular js testing in my app and have around 19 test cases at the moment, of which one of them is failing describe('Login page', function() { beforeEach(function() { browser.ignoreSynchronization = true; ptor = protractor.getInstance(); }); it('should contain navigation items', function(){ //test case code here }); it('should login the user successfully', function(){ //test case code here }) }); Currently, I run all the test cases. But, how can I run just one test

Xcode project how to detect target programmatically or how to use env vars

守給你的承諾、 提交于 2019-11-27 01:03:49
问题 I want to do an Application test that parses some json, stores to core data, and reads out some objects. How can my code know if it's being run as part of a test or normal run? Just some way to know "are we in test target"? Because the app when it fires up now kicks off a bunch of requests to populate my coredata with info from the server. I don't want it to do this during my tests. I want to fire up the App, read HARDCODED json from a file and store this using the same methods as otherwise

How to capture a screenshot after each step in tests with JAVA and Cucumber?

拥有回忆 提交于 2019-11-26 23:25:51
问题 What would be the best way to capture screenshots after each step when running integration tests? Tests are written in Java using Selenium(3.0.1) and Cucumber(1.2.4). Code for taking a screenshot after a test is below, but I need a screenshot after each method annotated with @Given, @When, @Then. @After public void after(Scenario scenario){ final byte[] screenshot = driver.getScreenshotAs(OutputType.BYTES); scenario.embed(screenshot, "image/png"); } Thank you for any hints. 回答1: Can this post

RSpec vs Cucumber (RSpec stories) [closed]

谁说我不能喝 提交于 2019-11-26 21:14:34
When should I use specs for Rails application and when Cucumber (former rspec-stories)? I know how both work and actively use specs, of course. But it still feels weird to use Cucumber. My current view on this, is that it's convenient to use Cucumber when you're implementing application for the client and do not understand how the whole system is supposed to work yet. But what if I'm doing my own project? For most of the time, I know how the parts of the system interact. All I need to do is to write a bunch of unit-tests. What are the possible situations when I would need Cucumber then? And,

Maven Failsafe Plugin: how to use the pre- and post-integration-test phases

陌路散爱 提交于 2019-11-26 20:56:25
问题 It is not completely clear to me how to best use the Maven Failsafe plugin for integration tests. My use case would be to test SQL queries against a local MySQL database. I understand that the database should be started during the pre-integration-test phase, and shut down during the post-integration-test . But how do I specify that? Is there a command line I should put in my pom.xml? Or a method that I should annotate with a specific annotation? 回答1: In the regular built-in maven lifecycles

Is it possible to specify a user agent in a rails integration test or spec?

只谈情不闲聊 提交于 2019-11-26 20:19:28
问题 I was doing this before in a rails 2 app in a ActionController::IntegrationTest with get '/', {}, {:user_agent => "Googlebot"} but this seems to not work anymore in Rails 3. What should I do? 回答1: If you use request.user_agent in your application, you can write the following code: get '/', {}, { "HTTP_USER_AGENT" => "Googlebot" } 回答2: None of the above answers worked for me, the following is what finally worked in an rspec controller test: @request.user_agent = "a MobileDevice/User-Agent"