Latest News

Showing posts with label software testing. Show all posts
Showing posts with label software testing. Show all posts

Tuesday, July 21, 2020

WILL AI REPLACE PROGRAMMERS?

Software developers have plenty to keep them awake at night. Their top concern is no longer how to express the latest algorithm in their favorite language (C, C++,Erlang, Java, etc.). Instead, It’s being replaced by artificial intelligence(AI).

Here we take a look at the process for AI writing code and answer the question: willAI replace programmers?

The Future of AI Technology

In a survey conducted by Evans Data Corp, 550 software developers were asked about the most worrying aspects in their career. 29 percent said, “I and my development efforts are replaced by artificial intelligence.”

A team of researchers at the U.S. Department of Energy's Oak Ridge National Laboratory agrees. By 2040, machine learning and natural language processing technologies will be so advanced that they will be capable of writing better software code. And they’ll do it faster than the best human developers. 

Oxford University’s "The Future of Employment" study warns that software engineers may become computerized as machine learning advances. And software design choices will be optimized by algorithms.

Software development, particularly in safety-critical industries, needs to ensure high code quality that delivers on functional requirements.

So, if AI is developing code, the code should be error- and issue-free. This also includes AI in software testing, as it should be able to detect coding errors “with a reliability that humans are unlikely to match.”

Top Programming Languages for AI Engineers in 2020 | by Claire D ...

Is AI Writing Code Possible?

AI can write code.

In 2015, Andrej Karpathy ran a project that used Recurrent Neural Networks to generate code. He took GitHub’s Linux repository (all the source files and headers files), combined it into one giant document (it was more than 400 MB of C code), and trained the RNN with this code.

AI generated code — including functions and function declarations — overnight. It had parameters, variables, loops, and correct indents. Brackets were opened and later closed. It even had comments.

However, the AI produced code had syntactic errors. It didn’t keep track of variable names.  Sometimes variables were declared but never used. Other times variables were used but not defined. The second function in the code example compares "tty == tty".

The project is available on GitHub. It uses the Torch7 deep learning library. Here is the whole output file produced by Karpathy’s exercise.

So, Will AI Replace Programmers?

AI won’t replace programmers. But AI might write code one day.

Of course, it will take time before AI will be able to create actual, production-worthy code that spans more than a few lines.

Advancement in Artificial Intelligence: Human+Machine ...

Here’s how AI will impact software development in the near future.

AI Will Improve

It will become effective at helping developers understand their options. And it will then let the human decide how to optimize for circumstances beyond AI’s understanding.

AI Will Become a Coding Partner

Software developers will use AI as a coding pair to write better software.

But Programmers Will Remain Important

The true value of a programmer is not knowing how to build it. The value is in knowing what to build.

It will take even longer before AI learns how to interpret the business value of each feature and advise you what to develop first. There will always be a role for the human programmer.

What If AI Writes Reliable Code?

That’s a big "if". Most humans can’t write reliable code. And AI is just an application that analyzes vast amounts of human written code. So, it’s unlikely that AI will write reliable code.

So, AI isn’t the answer to improving code quality.

Source: Perforce


 About us: TMA Solutions was established in 1997 to provide quality software outsourcing services to leading companies worldwide. We are one of the largest software outsourcing companies in Vietnam with 2,500 engineers

 Visit us at https://www.tmasolutions.com/

Thursday, October 4, 2018

Test Automation Patterns and Good Practices

 


Test automation, or automating the execution of your tests, provides several advantages: it saves your team time, resources, and the headache of having to do everything manually. However, test automation alone doesn't guarantee success. If you don't set up tests in the right way, you end up with the same bad results (just delivered a whole lot faster!).
Here are some patterns and best practices for test automation, so you can be sure your team is getting maximum value from your automation efforts.

Test Code Review

Tests (at the unit, API, UI, and performance level) should be reviewed to analyze their quality and to find mismatches or bad practices. For example, a set of tests could be fulfilling their coverage criteria, sufficiently invoking the intended code sections, but if proper assertions aren't written, the tests will be useless in identifying problems (that is, they will only execute the code, and not analyze whether what it does is good or not).
The practice of test code review also allows another person with a fresh perspective to add more tests that evaluate other aspects of the system, as well as verify that system requirements are clear and met.

Apply Assertions

As mentioned, assertions make the difference between a test that only tries out the code and one that really identifies problems. Each test automation tool verifies responses by providing a way to determine if a test has failed.
On the other hand, it's also best to pay special attention in the definition of assertions to avoid false negatives and false positives, since an overly generic assertion can result in incorrectly valid or invalid tests.

Behavior-Driven Development (BDD)

BDD refers to Behavior-Driven Development. As the name implies, this isn't a testing technique, but rather a development strategy (like TDD, test-driven development). A common language should be established for the business and engineers to be used as a starting point for development and testing. Typically, user stories are defined and later used as an input for test cases creation. Beyond the possibility of automation, the focus should be on using certain business requirements that can later be translated to acceptance tests.
One obvious advantage of BDD is that developers have clear specifications, so they can focus on what needs to be done - and in what way - at the business level. Like TDD where you have a method along with its tests, with BDD you already have an "acceptance test" at a business level.
Another advantage of the BDD approach is that it brings testability to the system. Thinking about functionalities in an independent way (as complete and involving all the layers of the system) guides a type of development that facilitates testing.

Page Object Pattern for UI Testing

When working with automation at any level, it's essential to focus on a solution's scalability and maintainability. That is, it shouldn't take more time to resolve conflicts or update an automation framework than the time saved by the automatic execution. To achieve this, the correct use of design patterns is fundamental.
When writing automated tests, one begins to generate code that contains a lot of knowledge about the structure of the application, like IDs of fields, buttons, and links, etc. Over time, the application will scale and be modified, so it's important that tests can be maintained with minimal effort.
The Page Objects pattern allows you to reuse this knowledge of the application while making each change in the pattern have minimal impact on tests. It consists of completely decoupling what concerns the structure of the user interface from the test code, and encapsulating this information in objects that represent application interface elements. In this way, the Page Object pattern strengthens tests.
By following a BDD approach, these types of patterns should also be applied, since they are complementary practices. This also applies to any automatic verification at the graphic interface level, regardless of whether Selenium (for web), Appium (for mobile) or any other tool is used.

Data-Driven Testing

While data-driven testing goes beyond a design pattern and involves a whole testing approach, we include it in this post as part of good programming practices.
Essentially, automated tests are parameterized so that the same steps can be executed with diverse amounts of test data. That way, simply adding data to the data file creates new test cases.
The greatest benefit of doing this comes when the same sequence of steps is executed with different data sets, parameterizing both the input data and the expected output data.

Parallel Execution of Tests

Unit tests and API-level tests generally run faster than UI tests. On the other hand, automated tests at the graphic interface level require access to the end-to-end system and handling of interface elements so, they require more execution time. This is why different strategies like parallel execution have become really useful.
If you work on a web application and automate with Selenium (the most commonly used option) it's a good practice to use Selenium Grid. With its multiple nodes, Selenium Grid has the advantage of easily combining operating systems with several browsers accessing the application. This leads to running several tests in parallel using the Grid reducing testing time.
When combining Selenium Grid with any integration tool as Jenkins, tests are triggered by connecting to the Grid and run on each node. Results are stored in association with the task (Job in Jenkins terminology) keeping track of the executions.
These are just some of the patterns and best practices you can use to improve your test automation.
With the right combination of tools and practices, you can move forward knowing test automation is propelling your team in the right direction.

Source: https://dzone.com/articles/test-automation-patterns-and-good-practices

Wednesday, July 18, 2018

Testers knowledge towards automation skills



If you look around the testing landscape you will see that manual testing roles are disappearing, but not manual testing itself.

Despite this, this skill set of a manual tester is still needed. According to Brijesh Deb, Agile Testing Evangelist and High Tech Test Manager at Sogeti, this is simply because it is impossible to have zero manual intervention. Every software, be it a mobile app or a component of the NASA rocket, would have to go through some kind of a manual test at some level, at least.
Nevertheless, it appears that not all testers have the skill set to carry out automation tests.
Deb commented: “Test automation is a far bigger animal with a much greater scope where everything from the inception, to the design to the coding, everything is done through automation.

Testing evolution

“The quality parameters have changed with a lot of additional weight now being given to non-functional parameters such as performance and security.
“What this means is that the skill set of the testers has also had to evolve. With this changing outlook of the software testing industry and the evolution in testing, it is imminent that testers add automation to their repertoire as manual testing alone is not going to be enough.
“About a decade or so ago, there was a lot of impetus being given to UI tests and UI was the primary candidate for automation alongside regression tests. Despite this, manual testing can be ubiquitous as the tests and code written for automation are, typically, written manually.”
Furthermore, Anand Bagmar, Founder of Essence Testing, believes automation is NOT the only skill for a tester to contribute and be effective.
”There are many other areas where they can add value – but they need to be able to learn, understand and show a willingness to get close to technology and code – that is non-negotiable from my perspective,” Bagmar added.

Skills & capabilities

In order to build good quality software that will give value to the users of that functionality and in-turn, the creator of the product as well, Bagmar recommends testers must have the following skills and capabilities:
  • Have a testing-mindset
  • Understand and radiate risk
  • Be smart and effective in ways of working
  • Optimise where possible
  • Evolve in learning and understanding
  • Ability/willingness/freedom to experiment and learn from what works well, or not
  • Collaborate with all relevant roles for deeper and shared understanding.
Deb continued: “Most of the time teams try to write code for tests which are executable manually and call it test automation. What confuses this, even more, is the testing vs checking debate.
“Be it the approach of testing the software manually or with automated tests, one common skill the testers must possess is “Test Craftsmanship”. Test Craftsmanship is a combination of the right testing mindset, with the knowledge of various testing tools and techniques. For manual testing, a solid grounding in test craftsmanship i.e., right testing mindset and the knowledge of various test design techniques might just be enough as it is more procedural in nature.
“Automation testing, on the other hand, requires knowledge of additional tool and languages for the tool to work. Depending on the context, both approaches serve different purposes and are equally important.”

DevOps & continuous delivery

Since the last decade, the focus is moving really quickly to DevOps. This means continuous integration (CI) and continuous delivery (CD) is absolutely impossible without continuous testing (CT). Yet, the fastest (or only) way to achieve CT is through test automation.
“In the fast-moving delivery and release life-cycles, manual testing does not provide much value. We need to focus on a healthy combination of exploratory testing and test automation (of all applicable types) to be effective as a team to build a good quality product. Any test that is important to be re-executed over a period of time needs to be automated at an appropriate level in test automation,” added Bagmar.
“While there is so much focus on test automation, one of the hindering factors for testers from taking up test automation as a career option is the ‘Fear of Code’”.
Since test automation involves writing code that involves accurate knowledge of one or more programming language(s), this scares a lot of engineers, according to Deb. There is a common misconception in the testing world that testers normally do not have access to the code and are more often than not involved in black box testing. So, there is no need to actually learn to programme.
“What testers do not realise is the fact that the knowledge of code will help them, investigate defects, debug errors and expand their avenues more by helping them find the unknown. Testing IMO is more than just finding defects. It is about finding the unknown and helping make the software better,” continued Deb.

Technology involvement

The most important skill required from the tester is the ability to get hands-on involved in technology. This involvement can be at various levels according to Bagmar:
  • Be able to understand/read code and make sense out of the same (logic)
  • Be able to understand/read the existing automated tests to know what “intents” have been automated – this reduces waste by having to repeat the same intent-validations manually
  • Do effective gap-analysis based on what has already been automated, and what would add additional value if automated. Thus, the knowledge of what does not need to be automated, hence focus on more deeper learning, understanding and exploration using human-mind
  • Contribute to enhancing automated test suite (unit/integration, API, UI/end-2-end /performance/security/etc.)
  • Contribute to building a more testable and functional architecture.
 Source: http://www.softwaretestingnews.co.uk/testers-knowledge-towards-automation-skills/

Thursday, August 3, 2017

Consumers Do Not Trust Innovation Technologies

Technological developments, such as artificial intelligence (AI), are being neglected over hacking concerns, despite it having the potential to change our lives.
A study carried out by IT and business change specialist, SQS, shows that the majority of the public is reluctant to buy into the latest tech products because of safety issues and malicious cyberattacks.
The study results found that 56% of survey participants are worried that their connected home apps could be hacked into; 40% believe break-ins would increase if connected home had a flaw; 80% looking to buy AI products said they might reconsider because of targeting by hackers; 52% think that home robots could fall victims to cyber criminals with malicious intentions and 48% claimed that they would not purchase AI technology at all due to cyber threats.
SQS’ CEO, Dik Vos, commented on the findings: “Emerging technologies should be embraced as early as possible if the UK is to gain an economic and technological advantage over countries who are willing to become early adopters. But for this to happen, the consumer trust issues that we have uncovered need to be addressed first.”
“Safety concerns and cyber vulnerabilities should be the top priority for companies developing innovative technology, rather than added as an afterthought or worse, once catastrophe has already struck. It is crucial that companies adopt a quality-first approach to gain the trust of the consumer. If advances such as AI, self-driving cars, home robots and connected houses are going to take off in the UK, stringent software testing and quality assurance must be carried out at every stage of product development to guarantee the safety of this technology,” he added.
SQS study concluded that emerging technology could severely affect the UK’s economic growth and to prevent this, businesses and organizations have a duty to prove to the public that every precaution has been taken to protect and safeguard technological developments and ‘human life’.


Tags

Recent Post