testing

Laravel Dusk + Vue with ElementUI

泪湿孤枕 提交于 2019-12-21 23:48:21
问题 I need help writting test with Laravel Dusk. I'm using Vue with ElementUI. I really like this framework, however, I can't use Dusk's build-in select() method in my tests. It's because the select component of ElementUI does not generate a real <select> tag, instead, it creates a normal <input> (that is readonly) and, at bottom of the page, the popper with select's options, so, there is not a <select> tag in my page, only a <div> and a readonly <input> . How can I write a test with Dusk that

Protractor: Click on SVG element not work

孤者浪人 提交于 2019-12-21 23:18:13
问题 I am testing an angularjs App using protractor. I need to test the click on an SVG element. Protractor can find the element, it can run the click on the element, but after the click nothing happens. It should change page after the click. The code is el=element(by.xpath('(//*[local-name()="g" ]//*[local-name() = "rect"])[1]')) browser.actions().mouseMove(el.getWebElement()).click().perform(); 回答1: I agree with what @alecxe suggested in his comment. You should be calling click() on the element

Why ModelAtribute passed as null?

北城余情 提交于 2019-12-21 23:09:21
问题 I developed next target class class Person{ public Person(){} public Person(String name) { super(); this.name = name; } String name; public String getName() { return name; } public void setName(String name) { this.name = name; } } next controller: @Controller private static class SampleController { @RequestMapping(value="/path", method=RequestMethod.POST) public String path(@Valid @ModelAttribute("person") Person person, BindingResult result, Model model) { model.addAttribute("name",person

Writing integration tests against external resources which are A/B testing

喜你入骨 提交于 2019-12-21 21:29:56
问题 I have a bit of a design question and I'm curious if other users have run into this and how to develop the most elegant solution. I have some integration type feature tests in Cucumber using Capybara/Celerity/Selenium. A portion of these tests drive an external website to see how well my resources integrate (cookies, Javascript, etcetera). One particular external site is undergoing their own heavy A/B testing with a similar but significantly different site design, so my tests fail with the

What unit-test frameworks would you recommend for J2ME? [closed]

杀马特。学长 韩版系。学妹 提交于 2019-12-21 21:26:30
问题 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 6 years ago . I'm relatively new to J2ME and about to begin my first serious project. My experience in testing isn't too deep either. I'm looking for a unit test framework for J2ME. So far I've seen J2MEUnit, but I don't now how well supported it is. I've seen JavaTest Harness but I don't know if it's not an overkill. Please

Numerical regression testing

邮差的信 提交于 2019-12-21 20:43:18
问题 I'm working on a scientific computing code (written in C++), and in addition to performing unit tests for the smaller components, I'd like to do regression testing on some of the numerical output by comparing to a "known-good" answer from previous revisions. There are a few features I'd like: Allow comparing numbers to a specified tolerance (for both roundoff error and looser expectations) Ability to distinguish between ints, doubles, etc, and to ignore text if necessary Well-formatted output

Protractor: Is it possible to test that there are no 404 in my app?

故事扮演 提交于 2019-12-21 20:39:05
问题 I'm new to protractor, I want to write a test to see that there are no anchors with urls giving 404 errors. I've seen this How to test html links with protractor?, but is for one determined link only, I want to do it for all links in the page. The test should pass for the http status 200, as stated here How to use protractor to get the response status code and response text? I have two questions: Does this test makes sense in protractor? Is it possible to test this? If so, how? 回答1: I think

Redux Testing - ReferenceError: localStorage is not defined

核能气质少年 提交于 2019-12-21 20:36:01
问题 I'm currently having a lot of trouble running tests on my redux actions. The test passes but I get the following error each time it is ran: ReferenceError: localStorage is not defined I also got an error before which was: ReferenceError: fetch is not defined I fixed this by using isomorphic-fetch. Anyway I am unsure on how I should configure Mocha to run these front end tests. Any help would be much appreciated. Mocha test command: mocha -w test/test_helper.js test/*.spec.js test_helper.js:

onCleanUp() vs onComplete() vs afterLaunch()

僤鯓⒐⒋嵵緔 提交于 2019-12-21 20:29:18
问题 In Protractor, there is a "global set up" method called onPrepare() , but I'm not completely sure what is meant to be a "global tear down" - there are three relevant methods: onCleanUp , onComplete and afterLaunch that are all called after a test execution. Why does protractor have three methods called after a test run? What is the difference between onCleanUp , onComplete and afterLaunch ? I've also noticed that there is an "exit" event that we can attach a callback to (example here):

How far can you go with JavaScript testing?

不打扰是莪最后的温柔 提交于 2019-12-21 20:16:13
问题 I'm somewhat informed with TDD and BDD with Ruby/Rails, but I will eventually need to use some form of testing with my JavaScript code. I use MooTools as a JS framework and I absolutely love how well I can organize and modularize my code with its codebase. But, sometimes, when I add new features to my application, I find that the functionality can easily break from how it worked before. When it comes to testing JavaScrtpt code, does the testing itself fall short of user interaction? Is it