All Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh
is now part of
LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Why write tests ? Some answers might be Because I have been told by my manager Some could be yay! let's bolt on writing tests because it's cool But some meaningful reasons could be Test-Driven Development is a developer practice that involves writing tests before writing the code being tested. Begin by writing a very small test for code that does not yet exist. Run the test, and, naturally, it fails. Now write just enough code to make that test pass. No more. It gives a strong base for your project or library or even a framework to build upon flawlessly
1) URL manipulation through HTTP GET methods: The tester should check if the application passes important information in the query-string. This happens when the application uses the HTTP GET method to pass information between the client and the server. The information is passed in parameters in the query-string. The tester can modify a parameter value in the query-string to check if the server accepts it. Via HTTP GET request user information is passed to server for authentication or fetching data. Attacker can manipulate every input variable passed from this GET request to server in order to get the required information
Step 1 - Identify Objectives The purpose of this step is to identify and write the performance objectives of your application. The key question you should ask yourself is: “How should my application behave under load?” The main parameters we should consider are: Response time- The time that would take the application to display a certain output or perform a certain calculation. Example: the product catalog must be displayed in less than 3 seconds. Throughput– The rate of successful message delivery over a communication channel. Example: the system must support 100 requests per second. Resource utilization- A frequently overlooked aspect,
1) Use Robust object identification methods: Preferred selector order: id > name >css>xpath To locate an element we can use • the element’s ID e.g- driver.findElement(By.id("LinkId")).click(); • the element’s name attribute e.g- driver.findElement(By.name("LinkName")).click(); • by CSS statement e.g- driver.findElement(By.cssSelector(“a#LinkId”)).click(); • the element’s CSS statement e.g- driver.findElement(By.css("LinkName")).click(); • an XPath statement e.g- driver.findElement(By.xpath([//div 2/a[text()=’LinkText’]")).click(); • by a links text e.
1) Do not use the Console to create your load: You can use the console for debugging purposes or to run a small load from it to make sure the script is running correctly. The GUI consumes a lot of memory under heavy load; therefore the console server by itself cannot sustain a heavy load. 2) Use the remote servers to create the load: Use the “Remote Start All” or “Remote Start” individual servers. 3) Limit the number of threads per engine to 300: This means the total number of threads generated by your test plan should be less than
MetricFu is an aggregator of several static code analysis tools for Ruby. It displays code metrics from Flog, Flay, Saikuro, Churn, Reek, Roodi, Code Statistics, and Rails Best Practices (and optionally code coverage with RCov). With MetricFu, you get a combined HTML report of all the metrics. Installing gem: gem install metric_fu Running follwing command from your application root. metric_fu This will generate reports in metric_fu's output directory (tmp/metric_fu/output). By default, metric_fu will use the built-in html formatter to generate HTML reports for each metric with pretty graphs and output can be seen
What are webhooks A Webhook is a method of altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not necessarily be affiliated with the originating website or application. WebHooks are an HTTP POST callback request sent to URL of a user’s choice in response to some event occurring. They offer simple and effective server to server communication without long running connections How do I implement WebHooks? Simply provide your users with the ability to submit their own URL, and POST
In one of the projects(ACES), we came across a functionality: to parse huge(50mb+) XML files. Here efficiency was very critical piece, as file size was huge. Also we wanted the results of parsing quickly for further analysis so the effective time was less and application performance was unhampered. We chose SAX Parsing Technique(DOM vs SAX) There are two ways to parse an xml file, DOM and SAX. SAX being more efficient as it process the xml file incrementally, thereby memory utilization is minimum. Whereas a DOM parser, builds a tree representation of the entire document in memory
oauth2 - A Ruby wrapper for the OAuth 2.0 specification. gem install oauth2 Basics of OAuth2 is well explained here: Oauth2 basics Creating OAuth2::Client instance require 'oauth2' client = OAuth2::Client.new('client_id', 'client_secret', :site => 'https://example.org') OAuth2 provides four authentication grant types : Authorization Code Grant Implicit Grant Resource Owner Password Credentials Grant Client Credentials Grant In UN project, we have used Resource Owner Password Credentials Grant type token = client.password.get_token('username', 'password') In case if Credentials are not correct, OAuth2::Error will be raised. With correct credentials, it gives OAuth2::AccessToken instance which
[git-sh][1] (git shell) is an interactive shell for git and its new way to use Git. git-sh provides a dedicated shell just for our Git commands. Installing git-sh: $ sudo apt-get install git-sh Start a shell with git-sh: $ cd liquor $ git-sh master!liquor *> At its simplest, git-sh saves you from typing the word git over and over. We are familier with these type of git commands: $ git status $ git add -p $ git commit $ git push With git-sh this gets easier: $ git-sh master!liquor *> status master!liquor *> add -p master!liquor *> commit -m "message" master!