automated-tests

Test coverage tool for Behave test framework

我是研究僧i 提交于 2020-01-02 02:59:06
问题 We are using Behave BDD tool for automating API's. Is there any tool which give code coverage using our behave cases? We tried using coverage module, it didn't work with Behave. 回答1: You can run any module with coverage to see the code usage. In your case should be close to coverage run --source='.' -m behave Tracking code coverage for Aceptace/Integration/Behaviour test will give a high coverage number easily but can lead to the idea that the code are properly tested. Those are for see

Dynamic TestNG XML Creation. Getting wrong XML. Where I am wrong

旧巷老猫 提交于 2020-01-01 19:33:14
问题 Dynamic TestNG XML Creation. Getting wrong XML. Where I am wrong. I want my testNG xml to be print as shown below. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="App Automation Testing"> <parameter name="BrowserName" value="chrome"/> <test name="MyTest1"> <classes> <class name="etaf.tests.LaunchApp"/> <class name="etaf.tests.LoginTests"/> </classes> </test> <!-- MyTest1 --> <test name="MyTest2"> <classes> <class name="etaf.tests

Can you use Protractor and Appium together to test hybrid apps?

允我心安 提交于 2020-01-01 14:56:11
问题 Here is my scenario. I have a website which is built on top of Angular JS. I am able to automate the website using protractor. However there are certain actions which when performed on website are reflected in Android and IOS devices. Here's what I want to achieve. Run my tests on website like I normally do but I want to fire commands to test the android and ios app also /* For eg: 1. Change password on website using protractor 2. Launch android app and check if the password has been changed

How to select a specific Tab position in Tab Layout using Espresso testing

拜拜、爱过 提交于 2020-01-01 12:12:13
问题 I have a tab layout with view pager .I am using Espresso for testing my android app. In my previous projects I use the tab title to perform click for selecting a tab Position like follows. Espresso.onView(ViewMatchers.withText("MAP")) .perform(ViewActions.click()); Right now I a have 114 tabs. So I can't use above method for randomly select these tabs for testing. Is there any way I can select tabs by its position. I already check other solutions but none of those helped me. 回答1: Should be

How to initialize ConnectionStrings collection in NUnit

社会主义新天地 提交于 2020-01-01 10:56:11
问题 I want to test ASP.NET application using NUnit, but it seems WebConfigurationManager.ConnectionStrings collection is empty when running from NUnit GUI. Could you tell me how to initialize this collection (probably in [SetUp] function of [TestFixture])? Should I copy Web.config somethere? Thank you! 回答1: If you have your unit-test assembly named Company.Component.Tests.dll, then just make sure that Company.Component.Tests.dll.config is there with the proper connection string. Additionally, it

Android Service Testing

余生长醉 提交于 2020-01-01 10:29:28
问题 How to test my IBinder object that Service return on onBind ? 回答1: It's according to the remote interface that you use between your context and the service (in remote call scenario). For example you can do like this: IBinder service = this.bindService(new Intent(TestService.class.getName())); assertNotNull(service); assertTrue(service instanceof ITestServiceCall); //see if the service returns the correct interface ITestServiceCall iTestServiceCall = ITestServiceCall.Stub.asInterface(service);

Android Service Testing

六眼飞鱼酱① 提交于 2020-01-01 10:29:08
问题 How to test my IBinder object that Service return on onBind ? 回答1: It's according to the remote interface that you use between your context and the service (in remote call scenario). For example you can do like this: IBinder service = this.bindService(new Intent(TestService.class.getName())); assertNotNull(service); assertTrue(service instanceof ITestServiceCall); //see if the service returns the correct interface ITestServiceCall iTestServiceCall = ITestServiceCall.Stub.asInterface(service);

Clicking 'OK' on alert or confirm dialog through jquery/javascript?

若如初见. 提交于 2020-01-01 08:35:07
问题 I was thinking of writing some UI tests in backbone.js and jquery. They may not be the best way to do it but it's something that I was thinking about - to automate the tests without record and playback - through plain code. The only thing that made me scratch my head using this approach is this: In some 'use-case flow' (of the execution) confirm/alert dialogs would show up. I'd like to click 'Ok' and continue the flow - is this even doable through plain javascript code? How? Note: I do know

Driver behavior executing parallel TestNG selenium tests with dataprovider

大憨熊 提交于 2020-01-01 03:43:07
问题 I want to run selenium tests in TestNg in parallel that use the @dataprovider. Ideally tests are parallel by method (one test = one method) and not simple suite parallelism by browser. I have read somewhere that about 5 instances of ChromeDriver can be controlled at a time so I thought this should be possible. Later I plan to move to grid2. For developement I'm running things with IntelliJ Idea test runner by right-click + run on the XML config file. I had problems running my tests in

Automated Testing Framework

核能气质少年 提交于 2020-01-01 02:49:07
问题 I am trying build an automated testing framework for some of our internal web services (java) at work. Each service has a set of APIs (3-5), although this could be relatively easy to achieve, the problem comes with some APIs which do not behave as pure functions, ex: something like persistX, this could store something in a database and returns an exception incase of failure. There is no easy way to validate since there is no output here. So I was wondering if this could a a bit generalized,