Testing

Geb provides access to JavaScript variables and also allows to run JavaScript on the page. With help of that feature properties can be accessed and actions can be performed (click, etc.)

Syntax: js.exec()

JMeter

The open-source LPT tool JMeter provides an excelent framework for load- and performance-testing several server types. Downloadable from http://jmeter.apache.org/.
With its full multithreading framework JMeter allows concurrent sampling by many threads and simultaneous sampling of different functions by seperate thread groups.
A GUI allows fast operation and high usability. Test szenarios can be recorded via a proxy server be by replayed offline. It is completely portable and 100 % Java.

Taggings:

How to easily automatize load- and performance-tests

Testing is an essential part in the software engineering process. Frameworks and tools help with the different testing steps like unit-testing, funcional testing, system testing, etc. When it comes to testing web applications and/or web services a crucial part is load- and performance-testing. This means simulating situations where lots of users fire lots of requests and testing if the application still ensures correctness and reasonable time-performance. A tool to easily simulate parallel user requests is wanted.

Sahi - a browser and OS-independent web-application testing tool

An alternative would be the automation tool "Sahi" (http://sahi.co.in/w/sahi). The great advantage is that it's independent from the used browser and operating system.

Taggings:

Use Selenium-RC

Install and use Selenium RC , see http://seleniumhq.org

Web Service Software Factory to speed up quality WCF and ASMX development

 

   Microsoft provides a module called Web Service Software Factory (WSSF) for Visual Studio 2008. According to preleases this functionality is included in the release of Studio 2010. This can be downloaded at this link (http://msdn.microsoft.com/en-us/library/bb931187.aspx). All produced code follows Message-patterns and many conventions. Furthermore, data contracts and services are visualized in understandable models which allow easy documentation (they have a UML notation - could be a UML profile in backend). The code (including test cases) is generated automatically. .Net in C# and VB.Net is available for the generation. The solution with all projects it automatically set up and can be easily extended by using own code such as references to other modules. The usage of it can be sketched like the following instructions. Please note, that the overall usage needs some training and is not documentable in this CMS system precisely. See the useful walkthrough from CodeProject to fully understand how it could be used in a real project and to identify the benefits: click 

  1. Install the WSSF
  2. Create a new WSSF project (see the walkthrough for better understanding)
  3. Now you can model your service contractdata contract and the host model. Start developing your datacontract. It defines the data types that can be used in your services
  4. Then continue with the Service contract. Several service endpoints with several operations (methods) for each can be defined. This is done by using message from and to the operation. Each message uses data elements from the data contract. 
  5. Specify the Implementation technology - ASMX or WCF (do this like in the walkthrough.. they provide a good step by step solution)
  6. Rightclick on your solution and slect "Add/WCF Implementation Projects." and create an implementation project with the type "Guidance Packages\Service Factory: Modeling Edition"
  7. Add your project to the "Project Mapping Table" of your ServiceContract and DataContract
  8. Open your Host Model (or create it if missing) and create a new Proxy. Then select the implementation Project here as well.
  9. Now you can configure your endpoint as you like.
  10. Finally the code can be generated by right-clicking on the canvas of your data and service contracts and selecting "Generate Code".

  Now you can build and use your service. Several endpoints can be used and configured according your connection requirements. Binding variants such HTTPBinding can be used to bind the service to different addresses using different names etc. Not all binding variants are available in this version (only the desired usages). In your service configuration security constraints such as the authentication mechanism can be set like for classical WCF or ASMX services. Futhermore, test cases could be generated. The models can be exported by using screenshots. The service can easily be modified, because of strict separation of own .NET code and the generated code. For optimal results try to use the modeled data contracts only as templates for the internally used data structures. However, it is sometimes useful to start the development by visually experimenting with this data contracts model.  (Sry for re-posting, but the solution-problem linking got lost)

Taggings:

How can the creation of WCF or ASMX Web Services be simplified at high quality level?

<p>&nbsp;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">Is there a way to increase the speed of overall web service development using .NET and preferrable WCF. This overall procedure should include the implementation, the testing, the support for documentation and the maintenance and feature extending in the future.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949; min-height: 15.0px;">&nbsp;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">Automatic code generation (server &amp; client) using patterns or strict conventions is preferred due to an easier communicatable result, because we use web services in way that they the user easily recognizes which parameters are requested and which are returned without searching through structures and procedures. The generation of tests should be possible at least on "Test shell" basis that can be completed. The generation should never remove own written code.</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">&nbsp;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">Additonally, the code generation should be possible for WCF and classical (ASMX) Web Services using the same input values.&nbsp;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">&nbsp;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">Naturally, we do not want to use the configurability of web services. It must be able to create unsecured / open web services without authtentication, but it should also be possible to secure them. Several different binding variants are used in our system at the moment and we typically publish our services several times on different machines addressing different users. This should be easier to configure and use in the future.&nbsp;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">&nbsp;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 12.0px Verdana; color: #494949;">&nbsp;</p><p>&nbsp;</p>

How to setup a Canoo Webtest Environment

I am working as part time softwaretester in a software development company. In the last months the main part of my work was testing the same testcases over and over again. All startet with a few testcases for a relatively small frontend. But as time goes by, the software developed and the functionality grew...and so grew the frontend of the application and the complexety of the testcases. At the beginning i only had about 30 testcases which covered the overall functionality of the application. Now i have to test about 100 testcases in the same time. So some solution had to be found. The great thing of the application i have to test is, that most of the navigation and layout stays the same, even when new functionality is implemented. That makes an automatic regression very easy. My goal was now to find a free, easy to understand, easy to install and easy to use test tool which fits my requirements. I chose "Canoo Webtests". It's an XML based test tool, which is really great. It produces very good testreports, it generates screenshots during the automated testing and it is relatively easy to install. Because its XML based the testcases are very easy to implement, and persons who are not so familiar with programming can understand and implement the testcases very easy.
Subscribe to Testing