testing

Could not find declaration file for enzyme-adapter-react-16?

这一生的挚爱 提交于 2020-02-21 08:08:09
问题 I've been using Enzyme to test components in my React application for some time. After updating my packages for the first time in a few weeks I've started getting an error from my tests. FAIL src/__tests__/title.test.ts ● Testing title component › renders Enzyme Internal Error: Enzyme expects an adapter to be configured, but found none. [...] To find out more about this, see http://airbnb.io/enzyme/docs/installation/index.html I proceed to install 'enzyme-adapter-react-16' as described in the

pytest assert message customization with variable introspection

a 夏天 提交于 2020-02-20 07:35:29
问题 In the pytest documentation it says that you can customize the output message when an assert fails. I want to customize the assert message when testing a REST API method it returns an invalid status code: def test_api_call(self, client): response = client.get(reverse('api:my_api_call')) assert response.status_code == 200 So I tried to put a piece of code like this in conftest.py def pytest_assertrepr_compare(op, left, right): if isinstance(left, rest_framework.response.Response): return left

Acquiring / accessing Citrix environment for QA purposes

泄露秘密 提交于 2020-02-20 07:34:23
问题 We have a Windows Forms, .NET 2.0 application delivered via ClickOnce and driven by web services, that our customers occasionally wish to deploy into a Citrix environment. In some cases, the customer elects to allow our application to be deployed locally to user machines and bypass the Citrix server, in one case we've provided a static installer for a customer to use with the proviso that updates would not be pushed automatically, and in some cases, our customer IT departments have had the

How can I quickly create large (>1gb) text+binary files with “natural” content? (C#)

一个人想着一个人 提交于 2020-02-20 00:54:16
问题 For purposes of testing compression, I need to be able to create large files, ideally in text, binary, and mixed formats. The content of the files should be neither completely random nor uniform. A binary file with all zeros is no good. A binary file with totally random data is also not good. For text, a file with totally random sequences of ASCII is not good - the text files should have patterns and frequencies that simulate natural language, or source code (XML, C#, etc). Pseudo-real text.

How can I quickly create large (>1gb) text+binary files with “natural” content? (C#)

て烟熏妆下的殇ゞ 提交于 2020-02-20 00:54:11
问题 For purposes of testing compression, I need to be able to create large files, ideally in text, binary, and mixed formats. The content of the files should be neither completely random nor uniform. A binary file with all zeros is no good. A binary file with totally random data is also not good. For text, a file with totally random sequences of ASCII is not good - the text files should have patterns and frequencies that simulate natural language, or source code (XML, C#, etc). Pseudo-real text.

How do I use TestNG SkipException?

六眼飞鱼酱① 提交于 2020-02-13 04:51:07
问题 How do I use TestNG throw new SkipException() effectively? Does anyone have an example? I tried throwing this exception at the start of a test method but it blows up the teardown, setup, methods, etc. , and has collateral damage by causing a few (not all) of the subsequent tests to be skipped also, and shows a bunch of garbage on the TestNG HTML report. I use TestNG to run my unit tests and I already know how to use an option to the @Test annotation to disable a test. I would like my test to

How do I use TestNG SkipException?

。_饼干妹妹 提交于 2020-02-13 04:50:07
问题 How do I use TestNG throw new SkipException() effectively? Does anyone have an example? I tried throwing this exception at the start of a test method but it blows up the teardown, setup, methods, etc. , and has collateral damage by causing a few (not all) of the subsequent tests to be skipped also, and shows a bunch of garbage on the TestNG HTML report. I use TestNG to run my unit tests and I already know how to use an option to the @Test annotation to disable a test. I would like my test to

Watir: How to retrieve all HTML elements that match an attribute? (class, id, title, etc)

我与影子孤独终老i 提交于 2020-02-07 01:47:08
问题 I have a page that is dynamically created and displays a list of products with their prices. Since it's dynamic, the same code is reused to create each product's information, so they share the tags and same classes. For instance: <div class="product"> <div class="name">Product A</div> <div class="details"> <span class="description">Description A goes here...</span> <span class="price">$ 180.00</span> </div> </div> <div class="product"> <div class="name">Product B</div> <div class="details">

Tapping the overflow menu in a Flutter test

会有一股神秘感。 提交于 2020-02-06 08:19:40
问题 How do I tap on the overflow menu in a Flutter test, doing so in a way that works for both Material apps and Cupertino apps? The icon differs between iOS and Android, so I can't just find the icon type. From the PopupMenuButton docs: If both [ child and icon ] are null, then a standard overflow icon is created (depending on the platform). This is analogous to pressing the platform-dependent icon for going back to the previous screen. The WidgetTester class includes the pageBack() method for

Trouble displaying test results in browser with Mocha, Chai, and webdriver.io

二次信任 提交于 2020-02-06 08:04:07
问题 I am using Webdriver.io with Mocha and Chai. I've written several tests that work great from the command line. It opens the Chrome browser, runs the tests, and displays the resultsin the command line. However I am having issues getting the results of the tests to display in the browser view (have a presentation that I would like to show the tests in the browser view). I'm using the mocha html template for viewing tests in the browser, but it only displays "passes: 0failures: 0duration: 0s" in