TestLink – Test Management System
TestLink is a web-based test management system that offers support for test cases, test suites, test plans, test projects, and user management, as well as various reports and statistics. It is developed and maintained by Team Test which facilitates software quality assurance. How to work with TestLink Create a Project Create Test Cases (Test Suites) for this Project Create Test Plan Specify the Build of the Project you are going to test Add Test Cases to the Test Plan Assign Test Cases to Test Engineers Execute Test Cases (Test Engineers) See Reports and Charts Additional facilities Assigning Keywords (we may form a group of Test Cases for Regression tests) Specifying Requirements (we may bind them with Test Cases in the many-to-many relation and see if our Test Cases cover our requirements) Events log (you can see here the history of all the changes) STEP 1. CREATE A PROJECT To create a project, go to the Test Project Management section: STEP 2. CREATE A PROJECT – IMPORTANT FIELDS Name ID (used for forming a unique Test Cases ID) E.g. FT-03 means that the Test Case is created for the Fenestra project and it has ID=3 Project Description (what is the aim of the Project, what is the target group, what is the business logic, what is the Test Environment) Enhanced features: Requirements feature – we may specify requirements and see if they are well-covered by Test Cases Testing priority – we may assign priority to Test Cases (high, medium, low) Test Automation – we may specify whether the test should be performed manually or automatically you can now set this project here, like in Mantis, in the top right corner STEP 3. CREATE TEST CASES Or here: STEP 4. CREATE TEST CASES – CREATE A TEST SUITE Test Case Title Summary Preconditions Execution type (manual or automated) Test importance (High, Medium, or Low) We may also import and export Test Suites and Test Cases (in the .XML/XLS format): We import them from one project And export the file to other STEP 5. SPECIFY TEST PLAN TestLink will not allow you to execute Test Suites if you do not create a Test Plan and specify Test Build. How to do that? Let’s begin with the Plan The current Test Plan will appear in the top right corner STEP 6. SPECIFY BUILD After you’ve added a Test Plan menu, the adding Test Build appears. Add a new build there STEP 7. ADD TEST CASES TO THE PLAN Unfortunately, only Test Cases, not Test Suites or the whole Test Specification can be added to a Test plan. So, until you don’t select one separate TC, the button “Add to Test Plans” will not appear. Then you can choose what Test Plans you want to add the selected TC too. STEP 8. ASSIGN TEST CASE EXECUTION TO TESTERS Before assigning TC to testers you should create a DB of users with appropriate roles here. Add the users you need to fill in the form. Then you can assign TC execution here. You can assign test cases to testers and send them email notifications. STEP 9. EXECUTE TESTS To start executing tests, Test Engineer should go to the test Execution section. Then choose a TC. You may also connect TestLink with our bug-tracking system Mantis, then during execution, you will see as below. After clicking on “Create New Bug”, to create the bug using the mantis user interface and reorganizing the window Test engineer writes the issue ID on Testlink It looks like this after saving Execution history is being saved STEP 10. SEE REPORTS AND CHARTS After the test case execution is finished you may see the results of it using the Test Reports section Or here: You can see the following page Test Plan Report – the document has options to define the content and a document structure. You may choose the info you want to get. Test Plan report (part of it) The document ‘Test Report’ has options to define content and document structure. It includes Test cases together with test results. Test result matrix Charts Charts – results by tester (there are only unassigned test cases in the diagram) Charts – Results for top-level suites: 1. Log in to the application 2. News module Blocked, Failed, and Not Run Test Case Reports These reports show all of the currently blocked, failing, or not run test cases. E.g. General Test Plan Metrics This page shows you only the most current status of a Test plan by the test suite, owner, and keyword. Query metrics – work like filters in Mantis Requirements based report If we have some requirements specified and have connected them with TC we can see the following report: ADDITIONAL FACILITIES – ASSIGNING KEYWORDS Go to the “Assign Keywords” section Select some Test Suite and then you will be able to go to “Keywords Management” Add keywords if there are no KW at all, or if there are no KW you need Now you can add Keywords both to Test Suites & Test Cases, either all the Keywords (>>) or only one KW (>) Then you will be able to see such a useful chart demonstrating the Results by KW You can open the section in this way Or in this: Requirements Specification adding Then we create Requirements Pay attention that there are different types of the Requirements Then assign requirements to Test Cases Select Test Suite or Test Case and assign it to 1 or more requirements (R. can be assigned to TC in relation to many-to-many) 1. We have all the documentation structured and organized. 2. We solve the problem of version control. 3. We can control the testing process (Events log + different kinds of Reports) 4. We can see if all the requirements are covered with Test Cases. 5. We can select Test Cases for Regression Testing. 6. We can see the results of testing in a very clear and easy-to-use form. Have questions? Contact the software
Calling Cross Domain WCF Service using Jquery
There is no guarantee that the WCF services and client application will be hosted under same domain. When you try to call cross domain WCF service hosted in different domain using client script, it behaves differently on different browsers. When you want to perform “POST” or “GET” request on cross domain WCF service or normal service using jquery/javascript or ajax, the browser actually sends an “OPTIONS” verb call to your WCF service that is not mention in your WCF method attribute. We mention there “POST” or “GET” to call a WCF service method and hence get error to call cross domain WCF service.In this case the client request headers method type is “OPTION” not “POST” and the response headers has content-type “text/html; charset=UTF-8” instead of “json;charset=UTF-8”. To change these options we need to do some changes in web.config of hosted WCF service.
Good Cyber Security Practices
1. XSS – Cross-site scripting vulnerability (XSS) Parameter values sent by the client browser to the web application should be inspected enough by the server and an attacker can inject HTML or Javascript code instead of legitimate values. This vulnerability can be exploited by an attacker to carry out Cross-Site Scripting (XSS) in order to execute code in the victim’s browser. This vulnerability is often used to recover session cookies of a legitimate user in order to steal his session or to usurp his identity and his rights. Recommendations: Filter or encode every parameter sent to the application. For example: drop or escape special characters such as <, >, /, ‘, “ … //To Encode scripts public static string Encode(this string Instance) { return System.Web.HttpUtility.HtmlEncode(Instance); } public static string UriEncode(this string Instance) { return System.Uri.EscapeDataString(Instance); } //To Decode scripts public static string Decode(this string Instance) { return System.Web.HttpUtility.HtmlDecode(Instance); } public static string UriDecode(this string Instance) { return System .System.Uri.UnescapeDataString(Instance); } 2. Weakness in the management of rights Ensure that all features or business functions are protected by an effective access control mechanism. A matrix should map user roles with features to avoid any unauthorized access. Do not assume that users will be unaware of special or hidden URLs or APIs. Implement an authentication process in order to protect sensitive resources or features against anonymous access. Recommendations: – Protect passwords by encryption or hash mechanisms. -Ensure only POST calls to the server to avoid logging. -Implement Industry Standard token-based authentication from the server. -Check authorization based on the server token. -Ensure that all parameters are encrypted before use. -Cross-check calculations and selections from the client before saving transactions on the server. 3. Information Leak Parameters can be passed to the dynamic websites via URL (GET method). Explicit and sensitive information may be present in these settings, such as the Active Directory domain(EXAMPLE), the user name (EXAMPLE), the user password, or information on software architecture. This information can be retrieved by observing the clear stream on the network or by observing the proxy server logs possibly located between the client and the server. Recommendations: – Ensure only POST methods to the server -Only use encrypted passwords. -Ensure no credit card information is passed via GET. 4. Cookie contains sensitive data User credentials, such as logins and/or passwords, may be stored in the browser’s cookies. An attacker having access to these cookies may be able to steal the credentials and so spoof users’ identities on the service. Cookies can be retrieved for example on public workstations when a user forgets to log off, or through a cross-site scripting (XSS) attack. Recommendations: Changing to server-based cookies and tokens will eliminate the possibility of sensitive data in the cookies. In order to maintain a user’s session across his browsing, cookies should only contain a randomly generated session identifier, which cannot be predicted. This kind of feature is already implemented in most web development languages and frameworks. HttpCookie _Cookie = newHttpCookie(“CookieName”,”CookieValue”); _Cookie .Expires=DateTime.Now.Add(7); 5. HttpOnly Option -Set HTTPOnly option in cookie A cookie is a small piece of data sent from a website and stored in a user’s web browser while a user is browsing a website. When the user browses the same website in the future, the data stored in the cookie can be retrieved by the website to notify the website of the user’s previous activity. Cookies are typically used to store session identifiers in order to allow the user to browse the website without re-entering his credentials. If the httpOnly optional flag optional is included in the server’s HTTP response header, the cookie cannot be accessed through the client-side script. As a result, even if a cross-site scripting (XSS) flaw exists, and a user accidentally accesses a link that exploits this flaw, the browser will not reveal the cookie to a third party. As the server does not set the httpOnly flag to session cookies, users’ browsers create a traditional, script-accessible cookie. As a result, the session identifier stored in the cookie becomes vulnerable to theft or modification by malicious script. Recommendations: Set the httpOnly flag to session cookies in order to prevent any access from client-side scripts. As far as possible, renew session cookies for every request in order to prevent their exploitation by an attacker. HttpCookie _Cookie = newHttpCookie(“CookieName”,”CookieValue”); _Cookie .Expires=DateTime.Now.Add(7); _Cookie.HttpOnly = true; // Summary: Gets or sets a value that specifies whether a cookie is accessible by client-side script. // Returns:true if the cookie has the HttpOnly attribute and cannot be accessed through a client-side script; otherwise, false. The default is false. _Cookie.Secure = true; // Summary: Gets or sets a value indicating whether to transmit the cookie using Secure Sockets Layer (SSL)–that is, over HTTPS only. // Returns: true to transmit the cookie over an SSL connection (HTTPS); otherwise, false. The default value is false. Have questions? Contact the software testing experts at InApp to learn more.
Server Paging in SQL Server 2012
Apart from the previous versions of SQL Server where the paging of result set is obtained using temp tables, ROW_NUMBER() and TOP, SQL Server 2012 provide simple functions for paging result sets. This comes in the form of OFFSET and FETCH. The given example shows the tricky method used in previous version sql server. SELECT TOP 10 * FROM (SELECT ROW_NUMBER() OVER(ORDER BY trx_id) AS row_num, trx_id,trx_date,item_id,qty,cost FROM trx_history ) trx WHERE trx.row_num > 20 We can achieve the same result using OFFSET and FETCH, but in more efficient way just like the example given below. SELECT trx_id,trx_date,item_id,qty,cost FROM trx_history ORDER BY trx_id ASC OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY
How to Implement a Hierarchy using SQL Server?
Hierarchy can be implemented using common table expression (CTE). WITH UserHierarchy ([user_id], [manager_id],[Level]) AS ( SELECT [user_id],user_ap_mngd_by as manager,0 FROM [user_profile] usrtmp1 WHERE usrtmp1.[user_id]=1 UNION ALL SELECT usrtmp2.[user_id],user_ap_mngd_by as manager, [Level] + 1 FROM [user_profile] usrtmp2 INNER JOIN UserHierarchy ON usrtmp2.user_ap_mngd_by = UserHierarchy.[user_id] ) SELECT * FROM UserHierarchy
‘Swift’ – Apple’s new programming language
Swift is Apple’s new programming language for iOS and OS X. Swift is fast, modern, and designed for safety and it enables a level of interactive development that is not seen in other platforms. Swift has features like closures, generics, type inference, multiple return types, and namespaces that make it easier for developers to create incredible apps. Swift is completely native to Cocoa and Cocoa Touch. Its design facilitates developers to write reliable codes, thereby eliminating common programming errors. It takes the best of Objective C and brings in a lot of aspects from modern scripting languages like Python. Swift is built with the same LLVM compiler, ARC memory manager model, and run-time as that of Objective C. This means that the Swift code can fit right alongside the Objective C and C code in the same application. Developers can very quickly and easily get the code running and see the results of the code simultaneously while writing the code. Swift’s ability to coexist with Objective C makes it easier to integrate with existing apps. Benchmarks on a swift application run more than they do on objective C or Python-based applications, which is surely a grade separator. Check out some sample programs in Swift by our SD team at the GitHub repository.
Type Annotations: An Added Feature To Annotations In Java 8
Earlier we could only use annotations in Java on declarations. With Java 8, annotations can be written on any use of a type in declarations, generics, and casts. Type annotations are not one of the highlighted features of Java 8. Annotations add more behavior to the piece of code we have written. So type annotation is just an add-on to that, in the sense, that it boosts productivity and ensures higher quality for our code. For example, if you want to ensure that a particular variable is never assigned to null. You would then modify your code to annotate that particular variable, indicating that it is never assigned to null. The declaration can be like this: @NonNull String str; When you compile the code the compiler prints a warning if it detects a defect, which allows you to modify the code if an error is found. After you correct the code to remove all warnings, this particular error will not occur when the program runs. When we look for tools that make our coding easier and simpler, annotations are never hard to find! So the question may arise as to why we need type annotations when we already have ordinary annotations to boost efficiency. The simple answer to this is that type annotation allows more errors to be found automatically and gives more control over your tools. In Java 8, type annotations can be written on any use of a type, such as the following: @Untainted String query; List<@NonNull String> strings; myGraph = (@Immutable Graph) tmpGraph; Annotations on types, like annotations on declarations, can be persisted in the class file and made available at run-time via reflection (using the RetentionPolicy.CLASS or RetentionPolicy.RUNTIME policy on the annotation definition). However, there are two primary differences between type annotations and their declaration annotations. First, unlike declaration annotations, type annotations on the types of local variable declarations can be retained in the class files. Second, the full generic type is retained and is accessible at run-time. In addition to adding annotations on declarations, we can use annotations on the type. By implementing this, we can use tools such as Checker Framework to check and clear software defects that affect the program semantics and thereby boost the overall performance of the code. We should try to explore and make use of these kinds of new techniques to the fullest so that our code would be clean and efficient.
Object List Sorting Using BeanComparator
We can sort List<Objects> using BeanComparater instead of writing comparator. The beanutils.jar has to be imported. Default sort order is in ascending order. For eg. Collections.sort(postings, new BeanComparator(“resumeCount”)); OR BeanComparator bc = new BeanComparator(“resumeCount”); Collections.sort(postings, bc); Collections.reverse(postings); Pros:- Concise, Minimal code Cons:- Low performance, uses reflection (now if a field is renamed, the compiler won’t even report a problem)
What’s New In Java 8? | Important Features of Java 8
Oracle launched a new version of Java Jdk1.8 with a lot of features. Some of the important features are provided below. 1) Lambda JDK 1.8 allows you to create Lambda functions. Lambda functions will become a powerful concept once integrated with JAVA. Lambda refers to an anonymous function in a programming language. Lambda function, generally known as Lambda expression, is a function but without a name. It is very much used in languages like Python and Ruby (which is borrowed from LISP) etc. An anonymous function (lambda function) does not carry a name, access specifier, access modifier, parameters, etc. It is just to simplify the code. The lambda function is very convenient to use in the same place where we write a function. If you would like to use the function only once, the lambda function is the more convenient way. It reduces typing a lot of code because the function code is written directly where we use the function and the programmer need not go to another part of the application to see the function code (if required to modify). To write lambda function in Java, we use -> symbol. package com.inapp.java import java.util.*; public class LambdaExpressionDemo { public static void main(String args[]) { List<String> alphabets = Arrays.asList(“A”, “B”, “C”, “D”); System.out.println(“NORMAL “); for(String str : alphabets) { System.out.print(str + “\t”); } System.out.println(“\nUSING LAMBDA :”); alphabets.forEach(str -> { System.out.print(str + “\t”); } ); } } Java 8 lambda expressions help to write less code in a more readable way. The lambda expression consists of two parts, the left of the lambda arrow and the right of the lambda arrow. The Left gives the list of parameters and the right gives the body part. Here, the parameter is “str” and the body contains a single “print()” statement. 2) Functional Interfaces An interface containing only one abstract method is known as a functional interface. For example, the java.lang. A runnable interface is a functional interface as it contains only one abstract method run(). A new annotation, @FunctionalInterface, is introduced to raise compilation error if an interface marked as @FunctionalInterface contains more than one abstract method. @FunctionalInterface public interface FunctionalInterfaceDemo { public abstract void display(); } 3) Parallel Sort This is a sorting mechanism introduced in jdk1.8 for better performance. package com.inapp.java public class ParallelSortDemo { public static void main(String args[]) { String strArr[] = {“java”,”php”,”dotNet”}; String strArr1[] = {“java”,”php”,”dotNet”}; // Normal sort Arrays.sort(strArr); System.out.println(Arrays.toString(strArr)); //parallelSort Arrays.parallelSort(strArr1); System.out.println(Arrays.toString(strArr1)); } } The performance with parallelSort() can be seen when the number of arrays to sort is very large. The same sorting can also be done using a List or Set instead of arrays. 4) Addition of Calendar In the normal way, each set() method is added as a separate statement, but in JDK 1.8, Calendar. Builder is used to instantiate Calendar instance and all set methods are used as a single statement. Semicolon is given only after the build() method. package com.inapp.java import java.util.Calendar; import static java.util.Calendar.*; public class CalendarDemo { public static void main(String args[]) { Calendar calendar = Calendar.getInstance(); //NORMAL calendar.set(YEAR, 2012); calendar.set(MONTH, MARCH); calendar.set(DATE, 09); calendar.set(HOUR, 7); calendar.set(MINUTE, 55); calendar.set(SECOND, 13); calendar.set(AM_PM, PM); System.out.println(calendar.getTime()); //USING JDK1.8 Calendar calendar1 = new Calendar.Builder() .set(YEAR, 2012) .set(MONTH, MARCH) .set(DATE, 09) .set(HOUR, 7) .set(MINUTE, 55) .set(SECOND, 13) .set(AM_PM, PM) .build(); System.out.println(calendar1.getTime()); } } 5) Replacement of Permanent Generation with Metaspace JDK 1.8 removes Permanent Generation (PermGen) space and in its place introduced Metaspace. In HotSpot VM, the PermGen is used to give OutOfMemoryError due to depletion of space, which may sometimes cause memory leaks while loading and unloading a J2EE application. From JDK 1.8, most of the memory allocation for storing metadata is done through native memory. The existing classes used to retrieve the metadata of a class no more works with metaspace. A flag is introduced to limit the maximum memory allocation for metaspace – MaxMetaspaceSize. If this flag is not set, the metaspace will be dynamically updated, at intervals, as per the requirement of the application running. The garbage collector is triggered to go for garbage collection when the metadata usage is more than the size of MaxMetaspaceSize. Due to the removal of PermGen space, we cannot configure the space through XX:PermSize & -XX:MaxPermSize. 6) Small VM The goal of JDK1.8 is to have a VM that is no more than 3Mb by allowing some features to be excluded at build time. The motivation behind this is to allow the JVM to run on small devices which have very strict static and dynamic memory-footprint requirements. Have questions? Contact the technology experts at InApp to learn more.
Power your app with ‘Pop’
Pop is Facebook’s new amazing animation framework for creating awesome dynamic animations. Now that Facebook has open-sourced Pop, designers/developers can access the source code from the GitHub repo. Pop is used by developers across applications, for adding visual flair to button states, for full-screen animated transitions, and much more. All the animations seen in the Facebook app are powered by Pop. Pop houses a rich library that facilitates the quick development of animations for iOS and Mac apps. Pop was designed with three objectives, commonly needed animations, an extensible framework, and developer friendliness. The three new primitives that enhance the richness of the Pop animation engine are spring, decay, and custom. “Spring” provides for the bouncy animation and “Decay” for a slow halt movement. Facebook’s ‘Paper’ is a true example of how powerful Facebook can be if it chooses to really push an app. Pop uses dynamic animation to control the bouncing, scrolling, and unfolding effects as in Paper a social network app. By open-sourcing Pop, a whole range of innovative animation features is due to be created. Have questions? Contact the technology experts at InApp to learn more.