unit-testing

Fake X server for testing?

和自甴很熟 提交于 2021-02-06 10:03:26
问题 At work we fully test the GUI components. The problem arises from the fact that, while the testsuite is running, the various components pop up, stealing the focus or making it impossible to continue working. The first thing I thought of was Xnest, but I was wondering if there's a more elegant solution to this problem. 回答1: I think what you need to do here is have your tests run on a different Display than the one you're working on. When we moved our TeamCity agents to EC2, we had to figure

How does one programmatically create a Spring context?

断了今生、忘了曾经 提交于 2021-02-06 04:51:52
问题 Does anyone know if there any way that I can programmatically create a bean context? I want to be able to do something like: ConfigurableApplicationContext c = new ConfigurableApplicationContext(); BeanDefinition bd = new BeanDefinition(); bd.setId("id"); bd.setClassName("classname"); bd.setProperty("propertyName", propertyValue"); ...etc... or better still be able to inject a ready made bean into the application context: c.addBean("beanId", beanObject); Or if I'm using annotations: c

How does one programmatically create a Spring context?

血红的双手。 提交于 2021-02-06 04:51:21
问题 Does anyone know if there any way that I can programmatically create a bean context? I want to be able to do something like: ConfigurableApplicationContext c = new ConfigurableApplicationContext(); BeanDefinition bd = new BeanDefinition(); bd.setId("id"); bd.setClassName("classname"); bd.setProperty("propertyName", propertyValue"); ...etc... or better still be able to inject a ready made bean into the application context: c.addBean("beanId", beanObject); Or if I'm using annotations: c

How does one programmatically create a Spring context?

拥有回忆 提交于 2021-02-06 04:49:11
问题 Does anyone know if there any way that I can programmatically create a bean context? I want to be able to do something like: ConfigurableApplicationContext c = new ConfigurableApplicationContext(); BeanDefinition bd = new BeanDefinition(); bd.setId("id"); bd.setClassName("classname"); bd.setProperty("propertyName", propertyValue"); ...etc... or better still be able to inject a ready made bean into the application context: c.addBean("beanId", beanObject); Or if I'm using annotations: c

Running tests as usual against docker containers or dockerize tests?

时光毁灭记忆、已成空白 提交于 2021-02-06 02:40:24
问题 I'm new to Docker and was reading up on Docker. It's a great way to test systems in a self contained and reproducible standardized configuration (when done correctly). However, in all the things I've read, there doesn't seem to be too much emphasis on how the testing should occur with docker containers. The docker is used to "contain" the infrastructure and application (code) for easy testing (as well as deployment). But sometimes test codebases are be large and not so simple too. And one can

Running tests as usual against docker containers or dockerize tests?

岁酱吖の 提交于 2021-02-06 02:40:12
问题 I'm new to Docker and was reading up on Docker. It's a great way to test systems in a self contained and reproducible standardized configuration (when done correctly). However, in all the things I've read, there doesn't seem to be too much emphasis on how the testing should occur with docker containers. The docker is used to "contain" the infrastructure and application (code) for easy testing (as well as deployment). But sometimes test codebases are be large and not so simple too. And one can

Running tests as usual against docker containers or dockerize tests?

给你一囗甜甜゛ 提交于 2021-02-06 02:35:15
问题 I'm new to Docker and was reading up on Docker. It's a great way to test systems in a self contained and reproducible standardized configuration (when done correctly). However, in all the things I've read, there doesn't seem to be too much emphasis on how the testing should occur with docker containers. The docker is used to "contain" the infrastructure and application (code) for easy testing (as well as deployment). But sometimes test codebases are be large and not so simple too. And one can

Running tests as usual against docker containers or dockerize tests?

半城伤御伤魂 提交于 2021-02-06 02:31:09
问题 I'm new to Docker and was reading up on Docker. It's a great way to test systems in a self contained and reproducible standardized configuration (when done correctly). However, in all the things I've read, there doesn't seem to be too much emphasis on how the testing should occur with docker containers. The docker is used to "contain" the infrastructure and application (code) for easy testing (as well as deployment). But sometimes test codebases are be large and not so simple too. And one can

Running android unit tests from the command line?

非 Y 不嫁゛ 提交于 2021-02-05 20:27:57
问题 I'm trying to run unit tests on the android platform in accordance with tutorial. Say, for example, I want to run tests for Email application. I open /apps/Email/tests/AndroidManifest.xml file, look for the <manifest> element, and look at the package attribute, which is com.android.email.tests , and in the <instrumentation> element I look at the android:name attribute, which is android.test.InstrumentationTestRunner . Now I open the console, and run $ . build/envsetup.sh $ lunch 1 $ adb shell

Running android unit tests from the command line?

僤鯓⒐⒋嵵緔 提交于 2021-02-05 20:27:00
问题 I'm trying to run unit tests on the android platform in accordance with tutorial. Say, for example, I want to run tests for Email application. I open /apps/Email/tests/AndroidManifest.xml file, look for the <manifest> element, and look at the package attribute, which is com.android.email.tests , and in the <instrumentation> element I look at the android:name attribute, which is android.test.InstrumentationTestRunner . Now I open the console, and run $ . build/envsetup.sh $ lunch 1 $ adb shell