back soft

مطالب مرتبط با «test» در back soft | نویسنده: استخدام کار

Tableview works on sim but not on test device

Vote count: 0 I have no idea whats wrong, there are no filenames to mess the case up on.. var nameArray = [String]() var textArray = [String]() var userArray = [String]() var latArray = [String]() var longArray = [String]() var timeArray = [String]() var locTextArray = [String]() var refreshControl: UIRefreshControl! var i = 1 @IBOutlet weak var tableView: UITableView! @IBAction func addButton(sender: AnyObject) { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class Card: Mappable { var locationText: String? var latitude: String? var longitude: String? var titlee: String? var text: Str...

ادامه مطلب

Selecting a value from jQuery Chosen Dropdown using CodeCeption test script

Vote count: 0 Hello i m trying to pick a value from jQuery Chosed Dropdown using codeception scripting, following is dev code United States Please select country United States Canada United Kingdom Ireland South Africa Turkey Although i am able to select it using xpath via following;(United Stated in this case) $I->click(['css' => 'div#Merchantserviceproviders_country_chosen']); $I->click(['xpath' => '//div[@id="Merchantserviceproviders_country_chosen"]/div/ul/li[2]']); But the issue is that the selection is through position of the value in the list, so as if any new value(country is added) i will not be able to select it until i know its placement. I want to know how would i be able to sele...

ادامه مطلب

Mocha vs Jest for testing React apps

Vote count: 0 Which testing framework is best for testing ReactJS apps? Are there others you recommend? I've tried Mocha with Chai and Jest, but haven't gone far enough to find which will work better in the long run. What are your experiences with these frameworks in larger projects? asked 47 secs agostaticinstance This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب

Switching between xvfb display screens when running Firefox tests on Selenium Grid

Vote count: 1 I have been ruing tests on our Selenium Grid and have run into a problem using the same xvfb display over - when I run a batch of 100 tests in parallel, most of which are filling in forms / clicking buttons - some tests get stuck entering in text or clicking on the button. This is not a "wait until element" appears issue, we've done that already. A user on a separate question had 1 answer to the above: Multiple Instances of Firefox during Selenium Webdriver Testing not handling focus correctly. The solution there worked for ruing a local Selenium test using FirefoxBinary. I am ruing a test on a Selenium Grid, meaning that I am creating a Remote webdriver object (in python): pro...

ادامه مطلب

Grails 3.1.1 with Java 8 time api in unit tests

Vote count: 0 I caot query domain classes in unit tests that use a field of type LocalDate. I am trying to persist date and time values like LocalDate which were introduced in Java 8. Grails 3.1.1 and Gorm 5 are the stack. I already followed How to configure Grails 3.1.1 to use Hibeate 5 to make use of Hibeate 5. I added compile "org.hibeate:hibeate-java8:5.0.7.Final" for the new type mappings of the date and time api. That works fine when ruing the app. Persist and load are possible. Unit tests on the other hand crash. For example take this domain class: class Event { String name LocalDate date } And this unit test: void "test criteria with date"() { when: def c = Event.createCriteria() c.l...

ادامه مطلب

Dummy response for rest unit test

Vote count: 0 I am trying to test a get request for a rest api i am building. I want to test the response has x number of replies. Now eventually this would be coected to a database so I would like to have dummy data that would be used for the test. This is what I have so far, and as you can see the hasSize(2) is the comparison. mockMvc.perform(get("/all")) .andExpect(status().isOk()) .andExpect( content().contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(jsonPath("$", hasSize(2))); Currently I have a hardcoded collection with two entries, but as I say it will eventually be coected to a database so the number of entries will change in development. What is the best approach to imitate...

ادامه مطلب

efficient way to get latest data using MAX()

Vote count: 0 I have a table which stores the exchange rates of currencies on a given day (TBAADM.EXC). However the exchange rates are manually entered, and the erroneous rate entered previously has to be archived, so the table can end up having multiple entries of a given from-to exchange rate per day because of user error or because the exchange rate has changed during the day. To do this, I have a column in the table called UPDATE_NO which indicates that a given entry is the nth entry for the day. For example, the first exchange rate entry for the day will have an UPDATE_NO value of 001. If the exchange rate has changed or was entered incorrectly, the next entry will have a value of 002, ...

ادامه مطلب

Fetch the latest two or more tweets of every user in twitter

Vote count: -1 we search the pakistani location tweets using twitter library 4j, that display us only one tweets of user in pakistan but i want to fetch 3 or more latest tweets of pakistani user of twitter here is code //gets Useame String useame = status.getUser().getScreenName(); System.out.println(useame); String profileLocation = user.getLocation(); System.out.println(profileLocation); long tweetId = status.getId(); System.out.println(tweetId); String content = status.getText(); System.out.println(content +"n"); asked 4 mins agoFARHAN ALI This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at five...

ادامه مطلب

mocha-phantomjs Can't find variable: require in my Test Runner

Vote count: 0 I'm using mocha-phantomjs. This is the first time trying to set this up. I'm not bundling anything do I need to?? I don't think unless it's assumed people are using something like browserify most examples out there don't talk about using that and they show their code working. Ultimately I am going to be ruing this mainly via console but figured why not get this test ruer working too. Here are my files: /test/features/specs test-ruer.html Mocha Tests mocha.setup('bdd') expect = chai.expect companies-list-spec.js 'use strict'; var mocha = require('mocha'), expect = require('chai').expect, phantom = require(''), page, pageStatus; before(function() { phantom.create().then(function ...

ادامه مطلب

Testing C# Web API on a smartphone/another computer

Vote count: 0 I created a simple web API in VS2015 which I'd like to test on my phone, however, I'm not able to access this API through my private IP address, only via localhost:PORT. I have read some suggestions which were saying to modify bindings in applicationhost.config file, but in this file, under I only have one site called WebSite1 which is not my web API I'm testing, therefore modifying bindings in there makes no difference. What should I make so that my web API is added to applicationhost.config's collection so I can make it bind to my private LAN address which I can then access with my phone? Thanks asked 4 mins agoleopik This entry passed through the Full-Text RSS service - if t...

ادامه مطلب

Do we have to create new instance of rest template in each method of integration test cases?

Vote count: 0 public void Method1() { restTemplate = new RestTemplate(); } public void Method2() { restTemplate = new RestTemplate(); } public void Method50() { restTemplate = new RestTemplate(); } .... Cant we create a mock of restTemplate and reuse it in all methods ? asked 2 mins agouser754657 This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب

How can I unit test an observable that is ObservedOn a scheduler?

Vote count: 0 Partly this comes down to the documentation for TestScheduler just not being very helpful, but... I have a class which my DI framework provides as a singleton: public class Foo : IObservable { private readonly IObservable _feed; private readonly IBarSource _remote; public Foo(IBarSource remote, IScheduler scheduler) { _remote = remote; _feed = Observable.FromAsync(async token => GetBarsAsync(token)) .Merge() .Repeat() .RefCount() .ObserveOn(scheduler); } public IDisposable Subscribe(IObserver observer) { retu _feed.Subscribe(observer); } private async Task GetBarsAsync(CancellationToken token) { var raw = await _remote.GetRawBarsAsync(); token.ThrowIfCancellationRequested(); re...

ادامه مطلب