w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Is there any testing tool/framework for unit testing of Oracle ADF bounded task flow?
What sort of testing are you looking to undertake? Functional, stress/load? Looks to Selenium or Oracle Application Test Suite (OATS) for functional. Look to OATS or Apache JMeter as options for stress/load. The advantage of OATS over other options is it has intelligence built in to understand the ADF framework.

Categories : Unit Testing

Can I use SOAPUI testing tool for automated testing of a purely web-based application?
I would question as to why you want to use soapUI for web UI testing? For web UI testing i would recommend using some other tool like selenium. As clarified in my comment below, it would seem that you can make soapUI and Selenium work together. See http://learnsoapui.wordpress.com/2012/09/27/selenium-soapui-can-they-work-together/ for details.

Categories : Testing

Unit-testing and Integration Testing for Large or Medium-Complexity System Models in SIMULINK
I would look into Simulink Design Verifier and Simulink Verification&Validation. Specifically, they offer features such as automated test generation and coverage analysis, which I think are applicable to your problem. As a side note... With regards to the matlab unit-testing framework which you mentioned in your post, this is basically a MATLAB implementation of the xUnit framework. So it obviously comes in handy if you want to be able to apply xUnit design patterns to tests of MATLAB code. The framework can be used to write tests for a Simulink model, but keep in mind that you have to be able to write the tests in MATLAB code. So this just means making use of the Simulink command-line interface (e.g. commands like set_param and sim) to setup and exercise your model, then use th

Categories : Unit Testing

When and why should I switch from functional Selenium testing to unit testing in a Django web app?
I'm using both selenium and unit tests right now, and here are some of my thoughts: Unit test run faster than selenium scenario tests. Unit tests are easier to write then selenium scenario tests. Unit tests are much more granular than selenium scenario tests. Unit tests are less brittle than selenium scenario tests. My selenium tests tend to run in a matter of minutes (they are several pages long) as compared to unit tests which are designed to run in less than a second. I have to spend a lot of time setting up the environment for a specific selenium test and then run it, and then check that the entire environment is in the right state. To test even a slightly different scenario, say, what happens if someone enters a bad value for one field, I have to start over from scratch. Unit tes

Categories : Django

Preparing an automated testing using javascript for testing a module
Note: This question is targeted towards nodejs module testing in general, not Arrow. I don't want to delete it as the author is looking for clarification of some things in the comments of my anwser. I will be happy to delete this anwser if it is requested. I would reccomend mocha http://visionmedia.github.io/mocha/. It is a great testing framework that is very popular. When combined with the module should, you can write simple tests, like this. require('should'); describe('Array', function(){ describe('#indexOf()', function(done){ it('should return -1 when the value is not present', function(){ [1,2,3].indexOf(5).should.equal(-1); [1,2,3].indexOf(0).should.equal(-1); done(); }) }) }) You can then set up a free web service called travis ci https://travis-c

Categories : Javascript

Testing ASP.NET Web API POST and Parameterless GET Routes with WebApiContrib.Testing
There seems to be some nasty issues here - after debugging through the WebApiContrib.Testing library, I've found the following... In the route mapping code used for the libraries own tests, the route mappings look like this... // GET /api/{resource} routes.MapHttpRoute( name: "Web API Get All", routeTemplate: "api/{controller}", defaults: new {action = "Get"}, constraints: new {httpMethod = new HttpMethodConstraint("GET")} ); My route mapping looks like this for essentially the same route... config.Routes.MapHttpRoute("DefaultApiGet", "{controller}", new { action = "Get" }, new { httpMethod = new HttpMethodConstraint(HttpMethod.Get) }); Notice the different syntax for constraint buildin

Categories : Asp Net

Unit testing - implementing equals only to facilitate testing
Uniutils has a perfect reflection equals method you can use for unit testing. This way your production code remains clear from all this test stuff. public class User { private long id; private String first; private String last; public User(long id, String first, String last) { this.id = id; this.first = first; this.last = last; } } Later in test: User user1 = new User(1, "John", "Doe"); User user2 = new User(1, "John", "Doe"); assertReflectionEquals(user1, user2); If you're using Mockito it has it's own means to do the same thing: Mockito.verify(userDeleter).delete(Mockito.refEq(user));

Categories : Java

Testing (not unit testing) private method correctness
This is the academia approach for all first year classes at the University of Waterloo, I imagine a similar approach is taken in the real world (my first co-op is 2014 so I don't know just yet). I find it very useful but it takes some time. If you create a class (henceforth mentioned as a module) then you need you create an associative driver module for each class. This driver file will consist of all your tests: testing edge cases and expected input to ensure your function(s) from your module behave as expected. Each driver module will have a main method and for your testing you will need to change the scope of your function from private to public (or call them all in the constructor). Keep in mind we are programming in C and driver modules are much easier to make without changing scope

Categories : C#

ember.js unit testing and integration testing
To run the test from just one JS file, specify the file name in the "files" array of your karma config file. Here's a sample config file I used recently. My example runs 2 js files for the test portion (the last 2 in the list), but you could easily just do one. Bryan

Categories : Ember Js

What is sanity testing? And what is its advantage in mobile testing
In mobile terms: In mobile applications there are following types of testing: 1) Sanity test 2) Feature test 3) Defect verification 4) Regression test 5) Hopper test Sanity test - It is a rapid testing of features to check the basic features and stability. Testing basically boils down in finding fall/not fall and if there are no rough errors. Sanity check is a very basic check to see if all software components compile with each other without a problem. It can be done by developers. This is just to make sure that developers have not defined conflicting or multiple functions or global variable definitions. Sanity test is usually unscripted. Sanity testing helps to identify the dependent missing objects. Sanity test is used to determine a small section of the application is stil

Categories : Testing

Testing for CLSCompliance (or testing for any attribute)
How do I test an item for CLSCompliant true / false? You get the relevant FieldInfo using Type.GetField, and then use MemberInfo.IsDefined. Sample code: using System; using System.ComponentModel; using System.Globalization; public enum DemoEnum { Foo, Bar, [Description("This is a baz")] Baz } class Test { static void Main() { foreach (var name in Enum.GetNames(typeof(DemoEnum))) { var field = typeof(DemoEnum).GetField(name); Console.WriteLine("{0}: {1}", name, field.IsDefined(typeof(DescriptionAttribute), false)); } } } If you need the actual attribute value, you'd need to use MemberInfo.GetCustomAttributes instead.

Categories : C#

How to do Play Framework with AngularJS e2e testing or with Play testing
Please be a little bit more precise about "proper behaviour". What is the bug ? Is the problem about integrating e2e tests with the Play workflow or just having e2e AngularJS green instead of red ? The difficulty here is to define "End-to-end" since there is no good definition of it, in wikipedia there is no mention about it. You can have have a good idea of what it is just because it is self-speaking, and there is also a excellent thread about end-to-end here : http://www.geekinterview.com/question_details/40319 So let's say that you want to test all scenarios with Front + Back in a close-to-prod environment. End-to-end testing AngularJS is supposed to be done with Karma, but, warning, it will be soon changed by ProtractorJS. Doing e2e test with Karma has serious drawbacks : It may

Categories : Javascript

Testing if URL does not contain set
regex.test returns a boolean. The . (object resolution operator) in JavaScript has higher precedence than ! (the not operator) excepting parentheses. That is to say that in ! /(?:)/.test("") The . occurs before the !, which reverses its value. You can check that p19 (or p followed by at least one digit) is not in the string with !/pd+$/.test(window.location.pathname) The other parts you have in the regex are not useful.

Categories : Javascript

Testing web service using C#
One part of testing a web service is testing what the web service does. You can do that with standard unit testing frameworks. This sort of testing has nothing to do with JSON or HTTP or REST, and that's a good thing. It will ensure that your service will work once you give it the correct JSON or HTTP or REST. After you have tested the functionality of the service, you may want to write some other tests to make sure that the JSON, HTTP and REST part works. For that, you might use WebRequest or WebClient, or Visual Studio Web Tests.

Categories : C#

DRY in controllers testing
you could try before(:each) block context 'with invalid attributes' do before(:each) do post :create, board_id: @board, link: FactoryGirl.attributes_for(:link, url: "") end it "does not save link to database" do expect(@board.links.count).to eq 0 end it 're-render :new template' do expect(response).to render_template :new end it 'sets an error flash message' do expect(flash[:error]).to_not be_nil end end

Categories : Ruby On Rails

e2e testing and $timeout
From AngularJS docs: In tests you can use $timeout.flush() to synchronously flush the queue of deferred functions. If you call many $timeouts, you can use the waitsFor jasmine function. Something like this: waitsFor(function () { $timeout.flush(); return workedThreeTimes(); }, 'should run something per minute', 1000 * 60 * 3); (sorry for my english)

Categories : Angularjs

testing if a DateTime was set
You could use SomeDate == default(DateTime) Note that this is not entirely safe. Calling default on a value type will return a value that might occur naturally in your application. For example, default(int) would give 0; default(bool) gives false. In the case of DateTime, the default is its MinValue, which is 00:00:00.0000000, January 1, 0001. Although the likelihood of this date occurring naturally in your application is low, it would still be better practice to convert your field to DateTime? and check for null, since it would make your intention more legible.

Categories : C#

Testing django_openid_provider
You are probably best off using a publicly accessible OpenID consumer or an OpenID client library to test django-openid-provider, since constructing an OpenID request manually is inconvenient. In the past, I've used mod_auth_openid (an Apache module) for testing against django_openid_provider, it works well. If you are really intent on manually providing the HTTP requests against the OpenID endpoint: OpenID uses GET requests, not POST requests. The parameters should be passed in the query string, not in the body. Using httpie, here's an example of a valid request against an OpenID provider , assuming: The OpenID endpoint is http://192.168.232.151:8008/openid/ You've used django-openid-provider to create an openid called myopenid The OpenID consumer (relaying party) is http://www.ex

Categories : Django

Unit testing of DAO
The idea of using mock objects to perform your unit testing strikes me as peculiar as all you are doing is testing your mock objects instead of your real ones. If you think you need to use mock objects to emulate database access then your entire architecture is wrong. I personally build all my software using the 3-Tier Architecture where I can have as many objects as I like in the Business layer, but only 1 object in the Data Access layer. Thus if I wanted to exchange real database access with dummy database access where would I make the change? All 200+ objects in my Business layer, or just the 1 object in the Data Access layer? Why should I then implement a mechanism to change every object within my application when all I really need to do is change one? Controllers are meant to

Categories : Unit Testing

Testing NSDocument
This is how you can start: #import <Cocoa/Cocoa.h> #import <XCTest/XCTest.h> #import "Document.h" @interface DocumentTests : XCTestCase { Document *document; NSWindowController *controller } @end @implementation DocumentTests - (void)setUp { document = [[Document alloc] init]; [document makeWindowControllers]; controller = (NSWindowController *)[document windowControllers][0]; } - (void)testLoadingWindow { XCTAssertNotNil(controller.window); } - (void)testTextFieldOutletsIsConnected { [controller window]; //kick off window loading XCTAssertNotNil(document.textField); } //For asynchronous testing use XCTestExpectation //[self expectationWithDescription:@"Expectations"]; //[self waitForExpectationsWithTimeout:3.0 handler:nil]; Correct approach: Do n

Categories : Objective C

Rapid CSS Testing with JSP
Check how you are deploying your application. If you deploy using nostage mode, the server(s) will keep looking in the original deployment directory and will automatically detect jsp changes for refreshes. This is as opposed to stage mode, where the original war/ear deployment is actually copied to each individual server. Read more here: http://docs.oracle.com/cd/E11035_01/wls100/deployment/deploy.html#wp1027044 Sounds like if you keeps dropping your updated deployment files in the same directory with nostage you won't need a restart.

Categories : CSS

DropWizard testing
Run from within the IDE Different Java IDEs permit more efficient workflows. For example, in an IDE you can run up your application using a Runtime Configuration that executes your Service.main() method with parameters of server hello-world.yml. This will save you endless Maven builds. Unfortunately, with Eclipse the hot swapping of code changes is often cumbersome, so I would recommend that you consider Intellij which is more reliable when it comes to hot swapping code. Even then hot swapping can be risky. Sometimes a restart is unavoidable That being said, in your situation hot swapping won't help. You are changing the startup configuration file which is only read at startup. You will have to restart to see the changes unless you create your own dynamic-refresh-on-file-hash-change me

Categories : Testing

Need of Integration testing
As you say, the best approach is dependant on the application. However, in general it is a good idea to have a suite of integration tests that can test your application end-to-end, to pick up any issues that may occur when you upgrade only one layer of the application without taking those changes into account in another layer. This sounds like it would be definitely worthwhile in your case, given that you have system components written in different languages, which naturally creates more chance of issues arising due added complexity around the component interfaces. One thing to be aware of when writing end-to-end integration tests (which some would call system tests) is that they tend to be quite fragile when compared to unit tests, which is a combination of a number of factors, including

Categories : Testing

Testing FPU on arm processor
Look at the assembler output with a -S flag and see if there are any fpu instructions being generated. That's probably the easiest thing. Beyond that, there is a chance that your algorithm was using floating point so rarely that any use would be masked by loading and unloading the FPU registers. In that case, O3 optimizations in your other parts of the code would show you gains separate of the FPU usage.

Categories : Gcc

UI testing using Selenium in .NET
Visual Studio is just an IDE, Selenium .NET binding is supposed to be working on any version of VS 2010. Visual Studio 2010 Ultimate has more features to help you developing .NET, but without it, Selenium library will still work fine, as it only depends on .NET framework, not IDE. That post is misleading, you can totally use VS 2010 Professional for everything described in that. Moreover, you can choose more commonly used open-source NUnit instead VS Unit Testing Framework. That post basically shows one way of doing things, not the only way, may not be the best way. For more information, please refer to the Official Documentation, here or here. Here is the comparison of different versions of VS, none of the features matter Selenium. Unless, you have some special needs for your .NET app

Categories : Dotnet

WCF webservice testing
You can create simple Console Application test client for WCF service and make service calls. Also setting breakpoints inside service methods will help you to debug. You should go through beginner tutorials about WCF: CodeProject link, MSDN link XML is default format for WCF, but you can switch to JSON using RequestFormat = WebMessageFormat.Json or/and ResponseFormat = WebMessageFormat.Json attributes.

Categories : Json

Unit Testing using Moq and MVP-VM
The first question is whether you are testing only one thing in your test method. In your case, I think you are testing two things in one method: raising event when validation returns true and retrieving data when event is handled. I suggest you separate them into two test methods. The second question is you use Mock without verifying, which means all mocks in your test method is stubs. I guess in your method at least you will verify one. The third question is I did not get what your real logic since you put some additional logic in your mock interface and test method. I think in unit testing of WPF with MVVM, you might not have to test raising event handler since that is .Net framework's job. What you need test is event handler works correctly. If it through command binding you can m

Categories : C#

O/RM Unit testing
You should use in-memory DB and make every test self-contained, without relying on pre-set data in DB (pseudo-code) test should_insert_my_object_into_db() { //given MyObject original = givenNewMyObject(); //when db.insert(original); //then MyObject copy = db.selectById(original.id); assertThat(copy).isEqualTo(original); } test should_delete_my_object_from_db() { //given MyObject original = givenMyObjectInsertedIntoDB(); //when db.delete(original.id); //then MyObject copy = db.selectById(original.id); assertThat(copy).isNull(); }

Categories : Unit Testing

Testing an android app
There is no better way to test your app that on multiple real devices. One of the top reasons for me is that you can easily simulate different situations under which your app should normally function: turning screen, receiving a call/sms while doing some operations, harassing the UI and the whole app with user interaction to see how it behaves. Different phones have different hardware capabilities, i had issues with app permissions that it limited the number of phones that could use my app and figured a way to remove it and still keep the same functionality now on a larger user base. I only figured this out by testing on multiple phones. Screen densities and sizes you can test on the emulator but you should still test it on a few different phones to see how it actually behaves on ldpi,

Categories : Android

Testing GWT requestbuilder
Might be your problem with request url in RequestBuilder. it should be something like RequestBuilder builder=new RequestBuilder(RequestBuilder.GET, GWT.getHostPageBaseURL()+"filename"); Use GWT.getHostPageBaseURL(), instead of other manually stuff.

Categories : Java

WCF stress testing
You can try WCF Load Test - http://wcfloadtest.codeplex.com/ You can also consider WCFStorm - http://www.wcfstorm.com/wcf/home.aspx

Categories : Wcf

Testing with geocoder gem
That piece of code should be in the SETUP portion of whatever test framework you are using. If using rspec, it should go here: describe Something do before(:all) do Geocoder.configure(:lookup => :test) Geocoder::Lookup::Test.add_stub( "New York, NY", [ { 'latitude' => 40.7143528, 'longitude' => -74.0059731, 'address' => 'New York, NY, USA', 'state' => 'New York', 'state_code' => 'NY', 'country' => 'United States', 'country_code' => 'US' } ] ) end end

Categories : Ruby On Rails

Testing UDP on localhost
If you are going to use this in a LAN setup, then you can always filter the received packet based on the sender's address -- recvmsg() of UDP allows you to retrieve sender's address and port number. If you are going to use this in a WAN setup, then this likely would not be an issue unless you are trying to do multicast. And, even with multicast, duplciate packets are not send back to the receiver. You can use IP_MULTICAST_LOOP to disable this option.

Categories : C#

Unit testing - log and then fail?
The idiomatic way is the way you have above. Also, you don't have to log any message if you don't desire. As defined by the GO FAQ: Why does Go not have assertions? Go doesn't provide assertions. They are undeniably convenient, but our experience has been that programmers use them as a crutch to avoid thinking about proper error handling and reporting. Proper error handling means that servers continue operation after non-fatal errors instead of crashing. Proper error reporting means that errors are direct and to the point, saving the programmer from interpreting a large crash trace. Precise errors are particularly important when the programmer seeing the errors is not familiar with the code. We understand that this is a point of contention. There are many things

Categories : Unit Testing

Testing for a Stream event
The callback to a timer doesn't take one argument. I don't know what you want to test, but here is a version where your func function is called with false from the Timer. var callback = expectAsync0(() => func(false)); // No need for count if it is 1. new Timer(new Duration(milliseconds: 100), callback);

Categories : Dart

XPath testing dates
I've always found that the easiest way to compare dates in XPath is to convert them to integers of the form YYYYMMDD, i.e. standard XML date format but with the hyphens removed. You end up with an effective comparison of the following: translate('2013-08-01', '-', '') > 20130824 It's a shame that your dates are stored as DD/MM/YYYY rather than YYYY-MM-DD as it means you'll have to do some work with substring() to reorganise the values, but it should be easy enough.

Categories : Vb.Net

Testing a gem that uses ActiveRecord models
Mostly inspired from this post: http://blog.markstarkman.com/blog/2013/01/23/using-sqlite-to-test-active-record-models/ First, in your gemspec, you can add ActiveRecord and sqlite3 as dependencies like so: spec.add_development_dependency "activerecord", "~> 4.0.0" spec.add_development_dependency "sqlite3" Then in spec/schema.rb, you can define your schema like so: ActiveRecord::Schema.define do self.verbose = false create_table :users, :force => true do |t| t.string :key t.string :name t.integer :age t.datetime :dob t.timestamps end end Then you can create your models in a models.rb file: class User < ActiveRecord::Base end In your spec_helper.rb, you want to connect to an in-memory sqlite database, load the schema, and require the models: r

Categories : Ruby On Rails

Testing embedded javascript
--This isnt the whole answer, but its the hard part, just get to know JsTestDriver and this will make sense, this needs to be a function inside the test file where you have the test functions for the embedded JS-- var url = "/test/<path to your html file>"; var request = new XMLHttpRequest(); request.open('GET', url, false); request.send(null); var doc = document.implementation.createHTMLDocument("SomeTitle"); doc.documentElement.innerHTML = request.responseText; var allScripts = doc.scripts; var script = allScripts.item(#);//the # is the specific script you want, look up .item() var scriptline = script.innerHTML.replace(/s/g, ' ');//everything needs to be in one line var script2 = document.createElement('script'); script2.innerHTML = sample; var h = document.getElementsByTag

Categories : Javascript

Django-Cache Testing
If it wasn't a view, I'd have recommended this: open up an interactive shell with manage.py shell, then do: from django.db import connection # execute your functions print connection.queries This list will fill up with SQL queries as you execute them. But since it's a view, I'd recommend you to use django-debug-toolbar. Besides other useful things, it'll show you the queries executed while handling the request.

Categories : Django

Article for testing CSS typography
There is, by a theme author for his own test. 2 pages of it: http://wordpress.wesleymiller.com/blahg/2013/05/30/layout-test/3/ http://wordpress.wesleymiller.com/blahg/2013/05/30/layout-test/2/ enjoy

Categories : CSS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.