integration-testing

How to kill Cocos2d-x test app

北战南征 提交于 2019-12-12 01:39:12
问题 We are creating an SDK that is used in Cocos2d-x games (on Android/iOS). As part of development, we have setup a test framework for running various tests on a real device (Android only at the moment). One specific test needs to kill the app and launch it again. It seems that Cocos2d-x does not provide any API for exiting (or killing) the running app. Some online resources suggested that people have used the call to exit(0) . Is there any way to exit the game from Cocos2d-x ? Calling exit(0)

Unable to click with Selenium in nested frames

天涯浪子 提交于 2019-12-12 01:38:16
问题 I am trying to navigate on a page with nested frames. The page structure looks like this: <frameset name="framesetContainer"> <frame name="WebTopMenu"> ... </frame> <frame name="WebContent"> <frameset name="framesetTopContainer"> <frameset name="framesetWSTopMenu"> <frame name="frameTitle"> ... </frame> <frame name="frameTopMenu"> ... </frame> </frameset> <frameset name="framesetLeftMenuContentContainer"> <frameset name="framesetLeftMenuContainer"> ... </frameset> <frame name="frameContent">

Rails/Capybara- Test that form does not submit

六月ゝ 毕业季﹏ 提交于 2019-12-12 01:24:54
问题 In my Rails app, I used the following jQuery to disable the ability to submit a form by pressing 'enter' in an input field: $('input').on('keydown', function(e) { if(e.which == '13') { return false; } }) I wanted to test this with Capybara, but can't figure out how. For example: # the form being tested creates a new Shift object: test "enter does not submit form" do shift_count = Shift.count # fill in form, etc... page.driver.browser.execute_script "var e = jQuery.Event('keydown'); e.which =

Why does <excludeGroups> work but <groups> doesnt?

允我心安 提交于 2019-12-12 00:47:16
问题 I am trying to split up integration-tests and smoke-tests using the @Category - Annotation of JUnit and profiles. So that if I run mvn clean install -P smoke-tests only the Smoke-Tests get executed and if I run mvn clean install every test runs. The thing is: When I exclude the groups in Maven with <excludeGroups> it excludes the groups as expected. But when I try to include them with <groups> it still runs every test. The Maven code is nothing fancy: <profile> <id>smoke-tests</id>

executeUpdate query not working on grails spock test

依然范特西╮ 提交于 2019-12-11 20:12:21
问题 Now willing to do integration test as below but problem is that MerchantTier.executeUpdate('update MerchantTier..........'), here update does not working but if I make update with def merchant = MerchantTier.get(params.id.toLong()) merchant.setValue(merchantTierVal) instead of execute update it works Is there is any prolem with executeUpdate Query? def merchantTier def setup() { merchantTier = new MerchantTier( startTier: tier, endTier: tier, value: 2.02).save(flush: true) } void "for given

Second datasource in spring application.properties for tests?

ⅰ亾dé卋堺 提交于 2019-12-11 19:44:31
问题 I have datasource defined in my application.properties as Oracle database and that's ok, the controller & repository work fine, I can persist entities and fetch database records. I have integration tests written. Before I connected my app with database I created some objects and persisted them in @PostConstruct method - and that was ok. But now, when I connected everything with database, my tests try to fetch records from the table which is pretty large. I think that's due to my application

Junit test run in Eclipse but fails with `gradle test`

我们两清 提交于 2019-12-11 19:34:57
问题 I'm using Spring Boot 2 and I'm trying to do an integration test. I configured a custom application.properties this way: @TestPropertySource( locations = "classpath:###/$$$/application-integrationtest.properties" ) @ComponentScan(basePackages = { "###.$$$" }) File is under src/test/java/###/$$$/application-integrationtest.properties Running Junit under Eclipse works fine, but if I try gradle test , I get: java.io.FileNotFoundException: class path resource [###/$$$/application-integrationtest

Automated test for a async Command in MVVM

回眸只為那壹抹淺笑 提交于 2019-12-11 18:49:43
问题 I have an asynchronous Command class, like so: public AsyncDelegateCommand(Func<Task> execute, Func<bool> canExecute) { this.execute = execute; this.canExecute = canExecute; } public virtual bool CanExecute(object parameter) { if(executing) return false; if(canExecute == null) return true; return canExecute(); } public async void Execute(object parameter) // Notice "async void" { executing = true; CommandManager.InvalidateRequerySuggested(); if(parameter != null && executeWithParameter !=

TestStartup contained in a TestProject that inherits from API.Startup (contained in separate project) causes 404 error

怎甘沉沦 提交于 2019-12-11 17:41:55
问题 I am trying to use a StartupTest.cs with XUnit and TestServer. I have followed these instructions using Visual Studio 2017 15.9.3: 1) Create a new solution. 2) Add an ASP.Net Core web application (web API) to the project. Call it API. No Https or Docker. 3) Add a xUnit Test project (.NET Core) to the solution. Call it: XUnitTestProject1 4) Add a reference to the Web API project from the XUnit project. 5) Install the following Nuget packages in the XUnit project: Microsoft.AspNetCore.TestHost,

Loading Spark Config for testing Spark Applications

*爱你&永不变心* 提交于 2019-12-11 17:23:30
问题 I've been trying to test a spark application on my local laptop before deploying it to a cluster (to avoid having to package and deploy my entire application every time) but struggling on loading the spark config file. When I run my application on a cluster, I am usually providing a spark config file to the application (using spark-submit's --conf). This file has a lot of config options because this application interacts with Cassandra and HDFS. However, when I try to do the same on my local