testing

Golang: Find filenames and line numbers that prints output to stdout

这一生的挚爱 提交于 2020-01-07 06:28:30
问题 I inherited a codebase with tens of thousands of lines, and several libraries, that prints out several lines of garbage (both from normal functions and imported libraries, as well as from test functions and libraries) onto the console when I run a go test . This makes testing a nightmare since my print statements and errors get lost in a sea of junk. Is there an easy way to identify and output the filenames and line numbers where any sort of printing to the console occurs, so that I can mute

selecting page elements with webrat

筅森魡賤 提交于 2020-01-07 04:34:12
问题 There is a list of products (html table). Each row has got product name and ends with 'add to cart' button. How to add 2 'coffee' and 3 'tea' in the cart from webrat? Corresponding html: <tr class="odd"> <td><img src="/images/menu_items_images/7/PICT0020_thumb.jpg" /></td> <td>cofee</td> <td>americano</td> <td>1.0</td> <td><form action="/cart/add_item/7" method="post" onsubmit="$.ajax({data:$.param($(this).serializeArray()) + '&authenticity_token=' + encodeURIComponent(

how to test site in motorola g in chrome emulator?

帅比萌擦擦* 提交于 2020-01-07 03:04:46
问题 I am testing my site in all the mobile emulator in chrome. Here moto g emulator is not available. My testing team is saying issue in the moto g. Can some one help how to test for motorola. Thanks in advance. 回答1: The only thing the "emulator" does is emulating screen resolution and pixel dimensions. Customize the screen settings: Click the values and adjust them. The Moto G has a reolution of 720 x 1280 pixels and set the pixel dimension to 2 or 3. Custom Device You can add a custom device if

how to test site in motorola g in chrome emulator?

拜拜、爱过 提交于 2020-01-07 03:04:27
问题 I am testing my site in all the mobile emulator in chrome. Here moto g emulator is not available. My testing team is saying issue in the moto g. Can some one help how to test for motorola. Thanks in advance. 回答1: The only thing the "emulator" does is emulating screen resolution and pixel dimensions. Customize the screen settings: Click the values and adjust them. The Moto G has a reolution of 720 x 1280 pixels and set the pixel dimension to 2 or 3. Custom Device You can add a custom device if

“Cannot perform 'Click' on the hidden control.” - Visual Studio 2012 only

試著忘記壹切 提交于 2020-01-07 03:01:08
问题 I'm recording a CodedUI test in Visual Studio 2012 and when I try to play back a simply "clik this link" recording, I get the following error. Message: Test method CancelSubmission.SubmitCancel.SubmitCancelMethod threw exception: Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException: Cannot perform 'Click' on the hidden control. Additional Details: TechnologyName: 'Web' ControlType: 'Hyperlink' TagName: 'A' Id: 'CustomNav_lbBox4' Name: '' Target: ''

[Cucumber][JVM][Maven]Tests dosen't run from command line through maven

☆樱花仙子☆ 提交于 2020-01-07 03:00:18
问题 I am running tests using java, cucumber with Maven. I am using Eclipse IDE. Also the pom.xml has cucumber dependencies. I am running tests in two ways. From Eclipse IDE: I run tests as Junit tests and the test results are successful. 2: From command promt: My test failed and below is the result. Here is the Pom.xml: http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 <groupId>CCIRA_Test_Auto</groupId> <artifactId>CCIRA_Test_Auto</artifactId> <version>0.0.1</version> <packaging>jar</packaging>

Create a Junit test case for a method which contains a call to another method from different class which calls to a different method of the same class

烂漫一生 提交于 2020-01-07 02:58:21
问题 I am new to java and Unit testing. I am facing a problem in writing a unit test to one of the test methods. Can you please help me with this. ClassA: Class classA{ /*......*/ classB method1_ClassA(parameters){ /*..... ..... ..... ..... .....*/ String some_Identifier = method2_ClassA(parameters) } private String method2_ClassA(parameters){ /*contains call to the database*/ } } ClassB: Class classB{ /*.....*/ } ClassC: Class classC{ /*.......*/ public classB method1_ClassC(parameters){ classA

Unit-testing a periodic coroutine with mock time

柔情痞子 提交于 2020-01-06 20:22:55
问题 I'm using Tornado as a coroutine engine for a periodic process, where the repeating coroutine calls ioloop.call_later() on itself at the end of each execution. I'm now trying to drive this with unit tests (using Tornado's gen.test) where I'm mocking the ioloop's time with a local variable t: DUT.ioloop.time = mock.Mock(side_effect= lambda: t) (DUT <==> Device Under Test) Then in the test, I manually increment t, and yield gen.moment to kick the ioloop. The idea is to trigger the repeating

Jmeter cleanup/ force not to abort before completely executing a group [closed]

左心房为你撑大大i 提交于 2020-01-06 20:19:20
问题 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 3 years ago . I have a jmeter script with 1 group containing 5 requests. I need this script to run forever and will kill it manually. the problem comes when i kill it manually but it has completed only two reuest and 3-5 are not done. eg: i am performing CRUD test. So it has created resurce

Can I use GNU make's SHELL variable to connect to a remote shell?

孤街浪徒 提交于 2020-01-06 19:57:42
问题 One of the projects I'm working on uses gnu make for testing. I would like to test on a platform that doesn't have a make implementation, but does have a POSIX shell. Is it possible to create a script (preferably in python) that can "stitch" a remote shell to make, and put it in make's SHELL environment variable? If not, is there another way anyone can think of to do it? 回答1: It is possible. Create a script that forwards commands to a remote host. For example: #!/bin/bash shift # remove -c