testing

PHP Script to populate MySQL tables

烈酒焚心 提交于 2020-01-10 18:16:25
问题 Is anyone aware of a script/class (preferably in PHP) that would parse a given MySQL table's structure and then fill it with x number of rows of random test data based on the field types? I have never seen or heard of something like this and thought I would check before writing one myself. 回答1: What you are after would be a data generator. There is one available here which i had bookmarked but i haven't got around to trying it yet. 来源: https://stackoverflow.com/questions/19162/php-script-to

What should be tested in 64-bit Delphi

给你一囗甜甜゛ 提交于 2020-01-10 14:56:29
问题 Delphi with 64 bit compilation is now in Beta, but only invited beta-testers will get their hands on this version. What should be tested by the beta testers? 回答1: Embarcadero will probably provide a tester's guide for the beta testers. But, here are some ideas: Memory allocation, alignment, heap and stack. 32-bit could use up to 4GB (well, 3.5) of address space on a 64-bit version of Windows with the /LARGEADDRESSAWARE switch: Delphi64 should be able to use much more. Try allocating 8, 16,

Expect not toThrow function with arguments - Jasmine

此生再无相见时 提交于 2020-01-10 12:12:29
问题 I have function that gets 3 arguments. I want to check that this function not throwing an error. I did something like this: expect(myFunc).not.toThrow(); The problem is myFunc need to get arguments. How can I send the arguments? P.S I tried to pass it argument but I got error that myFunc(arg1, arg2, arg3) is not a function. 回答1: toThrow matcher requires function to be passed as argument to expect so you can simply wrap your function call in anonymous function: expect(function() { myFunc(arg1,

Expect not toThrow function with arguments - Jasmine

烂漫一生 提交于 2020-01-10 12:11:22
问题 I have function that gets 3 arguments. I want to check that this function not throwing an error. I did something like this: expect(myFunc).not.toThrow(); The problem is myFunc need to get arguments. How can I send the arguments? P.S I tried to pass it argument but I got error that myFunc(arg1, arg2, arg3) is not a function. 回答1: toThrow matcher requires function to be passed as argument to expect so you can simply wrap your function call in anonymous function: expect(function() { myFunc(arg1,

How do you test code written against AWS API [closed]

佐手、 提交于 2020-01-10 07:58:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 months ago . I'm writing an application in Java that will upload a file up to AWS S3. The file will be given to the application in an argument, not hardcoded. I'd like to write tests to ensure that the file actually gets uploaded to S3. The test will be written before the code for TDD. (I

Method for email testing

我怕爱的太早我们不能终老 提交于 2020-01-10 07:20:08
问题 I am writing a program that will be emailing reports out many (~100) clients which I want to test before I spam everyone. I want to do a test run against my production data and actually send the messages to a SMTP server, but I don't want the SMTP server to actually deliver the messages. I want the server to act like a real SMTP server from the perspective of my application, but instead of delivering messages, I just want it to store the messages, and log what happened. Is there a SMTP server

Test framework for testing embedded systems in Python

白昼怎懂夜的黑 提交于 2020-01-10 04:39:25
问题 I would like to test the features of an embedded device. To simplify I can say it is an humanoid robot remotely controlled by a PC through a C/C++ API. I am very interested to use nosetests because of its non-boilerplate approach. However, my case is a bit more complicated. The actual test is running on a C# program and takes about 24h to complete. By switching to Python, I might save a lot of time developing new tests. But, before doing this, I am looking for some answers. The first problem

How to double click on an element using Selenium Webdriver

徘徊边缘 提交于 2020-01-10 04:09:10
问题 This is a dynamic list we have in our site. This is the HTML tag where I want to pass double click on. <td class="dxgv" align="left" style="color: rgb(51, 51, 51); font-size: 13px; border-bottom: 1px solid rgb(237, 237, 237); border-left-width: 0px; border-right-width: 0px; width: 5.6em; max-width: 6em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;">Sun Kumar</td> I want to double click on the first record all the time even though first record gets deleted after each click

Espresso match first element found when many are in hierarchy

天涯浪子 提交于 2020-01-09 19:19:07
问题 I'm trying to write an espresso function to match the first element espresso finds according to my function, even when multiple matching items are found. Ex: I have a list view with cells which contain item price. I want to be able to switch the currency to Canadian dollars and verify item prices are in CAD. I'm using this function: onView(anyOf(withId(R.id.product_price), withText(endsWith("CAD")))) .check(matches( isDisplayed())); This throws the AmbiguousViewMatcherException. In this case,

Spring mvc 3.1 integration tests with session support

ぃ、小莉子 提交于 2020-01-09 12:45:44
问题 I'm using the new spring-test in the 3.1 version to run integration tests. It works really well but I can't make the session to work. My code: @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration("src/main/webapp") @ContextConfiguration({"classpath:applicationContext-dataSource.xml", "classpath:applicationContext.xml", "classpath:applicationContext-security-roles.xml", "classpath:applicationContext-security-web.xml", "classpath:applicationContext-web.xml"}) public class SpringTestBase