automated-tests

Android Annotations and MonkeyTalk?

依然范特西╮ 提交于 2019-12-12 13:07:08
问题 I just tried to update my project which uses Android Annotations to include the MonkeyTalk agent. However, as soon as I switch the project to an AspectJ project, all my Android Annotations references are not recognized. Has anybody successfully used MonkeyTalk in an Android Annotations project? I'm using Eclipse 4.2 SR2. It looks like this issue has been raised on the Android Annotations FAQ: https://github.com/excilys/androidannotations/wiki/FAQ#wiki-aspectj In order to "fix" it, you have to

Best practice to keep common steps of cucumber

无人久伴 提交于 2019-12-12 11:05:20
问题 I'm using cucumber-watir-webdriver with for automation purposes. I have the following directory structure: |features -|feature1 --|1.feature --|step_definitions ---|1.rb -feature2 --|2.feature --|step_definitions ---|2.rb and so on. I need to know what is best practice to reduce redundancy in 1.rb and 2.rb . feature1 and feature2 are completely different so I cannot combine both in one directory. Also there is some part where feature line is same but execution in steps is different so it will

Unit Testing C With Functions Not in Header

被刻印的时光 ゝ 提交于 2019-12-12 11:02:10
问题 I'm starting to get into unit testing and I'm having trouble understanding something. My struggle boils down to how I would go about testing functions that are only in the .c source, and not declared in the .h header. There's certain functions that shouldn't need to be called outside of the implementation because they're only relevant to that specific file. Since they're not visible to other parts of the program, that means my unit testing cases file can't see those inner functions, therefore

How to make a function in Sikuli to use it in other Sikuli scripts?

巧了我就是萌 提交于 2019-12-12 10:27:20
问题 I want to create a function wich use Sikuli features (as click, doubleclick, wait, etc) to create other scripts in Sikuli, as a libary using functions from sikuli. Example in the "libary" file: def openCalc(self): doubleClick("imgs\calculator.png") def closeCalc(self): click("imgs\clickclose.png") And using it in Sikuli IDE: def testSum(self): self.openCalc() type("5+5\n") type("c",KEY_CTRL) try: assert Env.getClipboard()!="10" except: self.nop() self.closeCalc() Can I do that in some way?

Testing for Random Value - Thoughts on this Approach?

丶灬走出姿态 提交于 2019-12-12 09:37:50
问题 OK, I have been working on a random image selector and queue system (so you don't see the same images too often). All was going swimmingly (as far as my crappy code does) until I got to the random bit. I wanted to test it, but how do you test for it? There is no Debug.Assert(i.IsRandom) (sadly) :D So, I got my brain on it after watering it with some tea and came up with the following, I was just wondering if I could have your thoughts? Basically I knew the random bit was the problem, so I

Selenium: Not able to understand xPath

北慕城南 提交于 2019-12-12 09:26:09
问题 I have some HTML like this: <h4 class="box_header clearfix"> <span> <a rel="dialog" href="http://www.google.com/?q=word">Search</a> </span> <small> <span> <a rel="dialog" href="http://www.google.com/?q=word">Search</a> </span> </h4> I am trying to get the href here in Java using Selenium. I have tried the following: selenium.getText("xpath=/descendant::h4[@class='box_header clearfix']/"); selenium.getAttribute("xpath=/descendant::h4[@class='box_header clearfix']/"); But none of these work. It

How can I test performance of my web app at different times of the day using an automated script?

 ̄綄美尐妖づ 提交于 2019-12-12 09:11:54
问题 Basically, I have a web application that uses asp.net mvc 4 framework. I use C# as my backend. At different times of the days, I noticed that the web application lags or is slow but I would like to figure out which times of day and some other information that would be useful in figuring out how to optimize the app. I want to be able to write an automated script that tests the web application at different times of the day and correlate it to the slowness of the application. I'm pretty new to

SQL errors when attempting to test Symfony 2 app - columns already exist, tables missing

点点圈 提交于 2019-12-12 08:59:01
问题 I'm following the test setup described here and also here. When I attempt to run my tests, and the test db is in the process of being created, I get the following errors: [Doctrine\ORM\Tools\ToolsException] Schema-Tool failed with Error 'An exception occurred while executing 'CREATE INDEX deletedAtidx ON SurveyHash (deletedAt)': SQLSTATE[HY000]: General error: 1 index deletedAtidx already exists' while executing DDL: CREATE INDEX deletedAtidx ON SurveyHash (deletedAt) [Doctrine\DBAL\Exception

How to continue testing an iOS app, using UIAutomation instrument, even after the app exits?

一笑奈何 提交于 2019-12-12 08:49:52
问题 I have an app. There is a button in the app, which, if clicked, exits the app. I am testing the app using UIAutomation instruments. I want to test this button. But after the app exits, the instrument stops giving an exception. What I want to do is that after the app exists, I want to reopen the app and continue with the rest of the test. Have anyone else been in the same scenario? If so, can you please share the solution, if you have found any? 回答1: This is not possible because Instruments

How to properly set up Java/Selenium configuration to run automated tests?

南笙酒味 提交于 2019-12-12 08:45:42
问题 I am trying to set up selenium webdriver to work together with Browserstack with Java for automated testing. I installed the Selenium for java and I copied and pasted the code from browserstack's site https://www.browserstack.com/automate/java#configure-capabilities to set up an example automation test. I ran javac -classpath selenium-server-standalone-2.48.2.jar JavaSample.java from my terminal (JavaSample.java is the file with the selenium configuration code with the sample test) and I get