Showing posts from May, 2019

Selenium 4 Is Releasing Soon: What Every QA Must Know

Back in August of 2018 the whole testing automation community had been struck by the big news: Simon Stewart, the founding member of Selenium, had officially confirmed the release date and some of the major updates for Selenium 4 at the Selenium Conference in Bangalore. The 4.0 version of the worlds beloved framework for web testing automation was meant to be released by Christmas 2018. Selenium 4 release date Now, those who were familiar with the story behind the Selenium 3.0 release, which was also supposed to happen by Christmas, probably already knew back then, the new version would most likely indeed be finished by Christmas, but probably not in 2018. Just like it’s happened with the previous version which was released three years later than promised at the time of the original announcement. And they would have been right! As of today (and we are updating the information about Selenium 4.0 release in February 2019) the release of the new version still hasn’t happened. There weren’t…

Overview & Features of TestNG

TestNG is a testing framework developed in the lines of JUnit and NUnit, however it introduces some new functionalities that make it more powerful and easier to use. It is designed to cover all categories of tests − unit, functional, end-to-end, integration, etc., and it requires JDK 5 or higher. Automation Testers make use of TestNg to execute our tests. And it also provides some cool features in the form of parameters of annotations. Features of TestNG: Annotations (@BeforeMethod, @Test, @@AfterMethod etc.)Flexible test configurationSupport for data-driven testing (with @DataProvider)Support for annotation parametersDependsOnMethodsPrioritySupported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...).Default JDK functions for runtime and logging (no dependencies)What is an Annotation?
Annotation in TestNG actually is code snippet which lies just ahead of the method declaration and controls the execution of the methodAnnotation starts with @ sign. Please find the coding ex…

How to set priority of test methods execution in Selenium Webdriver using TestNG

TestNG also provides a way to set the priority of test cases. By priority I mean, priority of execution. It can be used with @Test annotation. Below is the syntax for it:


In below code example,
We have four test methods And we have set the priority of each method as 0,1,2,3 The method which has 0 priority will be executed first Then method with priority 1 will be executed and so on  So, this how TestNG gives us a very easy way to control the execution of our test methods/cases.

Program: importorg.testng.annotations.Test; publicclassTestngPriority { @Test(priority=0) publicvoidone() { System.out.println("This is test case 1"); } @Test(priority=2) publicvoidtwo() { System.out.println("This is test case 2"); } @Test(priority=1) publicvoidthree() { System.out.println("This is test case 3"); } @Test(priority=3) publicvoidfour() { System.out.println("This is test case 4"); } }

Fundamentally, What is programming?

Fundamentally, it’s arranging patterns so that, when fed to a machine, certain desirable patterns come out. This is a Jacquard loom: This is the device that inspired Charles Babbage to invent the computer. As you can see, it’s weaving a carpet. This is not a computer (there are certain important things that are missing, like internal state and the ability to also change the patterns on the paper), so this loom didn’t involve computer programming, but I think it’s still programming - just look at the tape; that’s obviously code, and I don’t think it’s unreasonable to call the person that wrote it a programmer.
Guest Author Vladislav Zorovprogramming enthusiast.
Lives in Bulgaria Love my answers? Donate to my gaming budget:

What is the most beautiful computer program?

The null program (i.e. empty program): In many languages it’s a quine (a program that prints its own source code).Full test coverage by default.Has a cyclomatic complexity of 1, the smallest possible value.Runs in O(1)O(1).People think their first program is “hello world”, but actually the first valid program they have written is most likely the null program.Is very portable, not just across operating systems and compilers but also across programming languages.Is at the base of every other program ever written.Sometimes, it is the program being written (The /bin/true Command).It literally breaks the charts on all metrics that are “per line of code”. Everything else is downhill from there :)

Guest Author Vladislav Zorov

Some basic Python Optimizations


For CPython, if you want performance you should prefer algorithmic optimizations (i.e. find better algorithms for what you're doing) or, if that's not possible, rewrite parts of your code in Cython.

You should generally aim for readability, and avoid micro-optimizations - except in cases where it's the same, like comprehension expressions: they are both more readable and faster (special-cased, emit less instructions than loops because there's no possibility of break, continue or return - compile.c, Ctrl+F, "List and set comprehensions").

You should always profile your application before optimizing, and you should profile with real (or realistic) data and in an as complete state as possible - concentrate on optimizing stuff that actually matters, not stuff you think matters.

You have been warned. On to the fun part.

>>>from dis import dis>>>def fn(a): b = a