testing

ruby - how to use tags within examples for minitest

試著忘記壹切 提交于 2019-12-24 01:13:05
问题 I have require 'minitest/spec' require 'minitest/autorun' require 'minitest/tags' require 'rspec/expectations' describe "One happy and one sad test", :happy do include RSpec::Matchers it "it is true" do expect(true).to be true end it "it is false" do expect(false).to be true end end and the describe tag works but I can't add a tag to the it , as in it "it is true", :happy do expect(true).to be true end without getting: $ ruby test_example.rb ...1: from test_example.rb:9:in `block in <main>' .

Saving the default processor architecture for tests in VS 2017

不问归期 提交于 2019-12-24 01:12:58
问题 I am using Visual Studio Community 15.7.5 and I have checked in my complete solution to github. It contains 3 projects, where one of them is using the google test framework. Additionally I am using the VS-extension "Google Test Adapter" from Christian Soltenborn. Now I want to be able to clone my solution from github to an arbitrarily place in my filesystem and be instant ready to compile and running all stuff inclusive the google tests WITHOUT modifying something at the solution-/project

Using Selenium, xpath cannot find 'text' element

梦想与她 提交于 2019-12-24 00:57:18
问题 I'm new to Selenium and have a problem to find an element by XPath. I was trying to handle this issue but spent too much time on it and it still doesn't work. I'm trying to automate file downloading from this site. I'm searching for the element which contain version name and afterwards I need to click the download icon accordingly. I'm writing the following code in order to find element var element1 = driver.FindElement(By.XPath("//*[@id='versiontable']/div[3]/a[Text()='Firefox 22.0 (Beta 2)'

how to customize robot framework test reports [closed]

你说的曾经没有我的故事 提交于 2019-12-24 00:54:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 months ago . I want to customize robot framework test report, in order to fit my need. Where can I find the related python source that handle this feature? Or I need to create a 3rd party library to handle this? 回答1: One solution is to create your own report from scratch. The XML output is very easy to parse. You can turn

Change in compiler, not the framework - Is a full cycle test needed?

女生的网名这么多〃 提交于 2019-12-24 00:50:44
问题 We've a long running project which is under development in VS 2008 and .NET Framework 3.5 . The software has gone through many test cycles. We're still adding features, fixing bugs etc. A full cycle test (testing every feature - 6 weeks of testing for one person) was also done many days ago. Now, when a new feature is added or some bugs are fixed, only relevant portion gets tested before new release. We're planning to gradually start using VS 2010 . The software will still run in .NET

Java Random seed

余生颓废 提交于 2019-12-24 00:42:14
问题 I need to test out a Java program 20 times and need to set the random seed so that the tests can be repeated. If I were to set the initial seed as 0 and then increment by 1 at each run (i.e. 1,2,3 etc), would this method still ensure complete randomness, even though the seeds are not far apart? Thank you 回答1: Any seed will provide the same level of randomness as any other seed for a standard PRNG like the one included with Java. So it's fine to use an incrementing seed for tests. You might

How do I test a context menu entry in a Chrome Extension?

做~自己de王妃 提交于 2019-12-23 23:34:55
问题 I have a Chrome extension that adds an entry to the browser's context menu, that allows a user to copy the top-level heading of a page to the clipboard. Example: Given the following HTML: <h1>My Page</h1> Right clicking on the page, selecting Plugin Name > Copy Title , will copy the string "My Page" to the clipboard. This should only work on a specified domain. I'd like to write tests to ascertain that: The context menu entry only appears on the specified domain When on the specified domain,

Autofixture generate collection without duplicates (by ID)

ぃ、小莉子 提交于 2019-12-23 22:35:45
问题 I have following classes: public class Foo { public List<DescriptionInfo> Descriptions { get; set; } } public class DescriptionInfo { public int LanguageId { get; set; } public string Value { get; set; } } I want to create Foo instance, using Autofixture. However, the LanguageId must come from a predefined list. Therefore I've created following customization: public class LanguageIdSpecimenBuilder : ISpecimenBuilder { private static readonly List<int> LanguageIds = new List<int> { 1, 2, 666,

Are their semi automatic tools to help produce minimal test cases, similar to git bisect?

喜欢而已 提交于 2019-12-23 22:25:56
问题 An example: you have a large complex webpage which is broken in some little way, say a button isn't clickable when it should be, and used to be. You can use git bisect to find out when it broke, but I'm curious about tools to help you find why it broke. Image it broke after a large commit, or perhaps you only have a webpage with no version history. Typically to debug something like this you go through the following process to reduce the big complex page into a minimal test case: Step 1:

Moving from plain Groovy to Gradle

佐手、 提交于 2019-12-23 22:22:33
问题 I have a working little application made in Groovy. At the moment I can test it on the command line, but I need to integrate it with a Jenkins server. Hence I have thought to integrate it with Gradle to produce test output in a standard format that Jenkins can read. (Please, consider that I am new to Groovy, Gradle, Jenkins and the JVM environment in general). At the moment all my tests live inside a single MyTest class that extends GroovyTestCase . I can run it with a little bash script like