Select Page

Category Selected: 2016

53 results Found


People also read

API Testing

Postman API Automation Testing Tutorial

Automation Testing

Top 10 AI Automation Testing Tools

Automation Testing

Talk to our Experts

Amazing clients who
trust us


poloatto
ABB
polaris
ooredo
stryker
mobility

The need for testing the IoT (Internet of Things)

While IoT has a positive impact on making our lives easier, it will also need Organizations pay close attention to security, risk, design and architecture of their products and testing.

The IoT and related infrastructure are all centered around the goal to provide Human Experience at its best, be it your home appliances, Workplace, Shopping, etc. The human-machine interactions have evolved beyond just keystrokes to capture touch, motion, and emotions.

Unlike normal applications, IoT applications are characterized by unique factors, such as –

  • Combination of hardware, sensors, connectors, gateways and software.
  • Real-time stream analysis / complex event processing
  • Support for data volume, veracity, volume and variety.
  • Visualization of large scale data
  •  
    The main challenges faced by Organizations exploiting IoT are –

  • Too frequently changing or disruptive technology
  • Talent availability in the market to develop and support the ever changing technology
  • Managing the risk of immature technologies and the vendors providing them
  • Enterprises across the globe are rapidly developing, migrating and rolling out IoT enabled products into the market.
  • IoT has a very Dynamic environment where millions of sensors and various devices work in conjunction with intelligent software.
  • Creating and maintaining a Test environment to validate functionality, scalability, and reliability.
  • Privacy and Security Concerns
  •  
    Given the complex architecture of IoT systems, mandate several types of testing that will touch all components. Some of the important testing areas are –

  • End user application testing
  • Performance, Real time testing
  • Network impact testing, including Edge testing (to check sufficient bandwidth, capability, etc.)
  • Security testing
  • Human experience testing
  •  

    IoT (Internet of Things) Testing

    The IoT is a network of physical devices or things that are embedded with sensors, actuators or programmed software to build connectivity.

    The “Internet of Things” installed base will grow to 26 billion units by 2020, says Gartner. Other researchers predict that the estimate may go above 100 bn.
    These sensors are transforming how we work and live.

    The smarter cities, railways, healthcare, manufacturing, retail, home, workplace, insurance are all evolving with the combination of sensors and applications.
    The influence of IoT is very much evident across different verticals as product designers dream up ways to explore and exploit real-time machine-to-machine connectivity and intelligence.

    IoT is tied by 3 main components –

  • Things: What we refer to “Things” here are real-world objects or devices that include the sensors and embedded software required to communicate with other environments.
  • Communication: the core networking component that helps ‘things’ connect with each other.
  • Computation: is often done on the server, mobile device to make intelligent decisions based on user behavior and analysis.
  •  
    These days, everything can be controlled from your smartphone – including security systems, your door-locks, refrigerators, and thermostats. Wearables and related technology is expanding – provides real-time data through fitness trackers, smart watches, GPS navigators, etc.

    This article talks about the paradigm shift required in QA organizations to embrace the technology and mindset changes in IoT’s broad spectrum.

    Types of Testing:

  • Connectivity testing: to ensure that the ‘Things’ and communication infrastructure are connected.
  • Exploratory testing: This is used on an empirical system where you have an opportunity to inspect & learn and think beyond the pre-defined testing procedures.
  • Compatibility testing: As devices, sensors, mobile OS, protocol versions are upgraded, this test is necessary
  • Performance testing: to test the internal capabilities of the embedded systems, network communication
  • Security testing: to uncover issues of privacy, spying and autonomy
  •  
    What should the QA look for in IoT world?
    Let us look at these as opportunities rather than labelling them as Challenges. The role of the QA is critical as the IoT expands its horizon comprising of devices, sensors and applications. It’s essential for the QA to have a bigger picture and understand from the business /product and user levels on how these work and generate value.

  • Interoperability: devices should support the features, work with other devices and external implementations.
  • Security: it’s crucial to tackle security and data privacy issues across IoT ecosystem. These include – Identify and authentication, Data encryption, Data protection, Storage (including cloud).
  • Usability and User experience tests: how the human-machine interactions happen and the rea-time usability
  • Creating QA environment: to validate the interfaces along with growing data volume. The development sandboxes can be leveraged with the help of virtualization tools.
  • Hardware and software conjunction with intelligent software means that mere functionality testing is not sufficient.
  • The end-to-end IoT system should be working: example- a shipping tracking system should ensure correct delivery of product. So, not only are the individual systems expected to work efficiently, but also the interfaces should work appropriately.
  •  
    Focus areas:

  • Test As-a-user mindset versus test against requirements: IoT focuses on ‘experience’ rather than mere feature-driven products.
  • Tests to span overall digital portfolio: to simulate real-time experiences spanning a wide range of digital components.
  • Integrated tests: As the IoT landscape widens, there is a critical need for continuous and flawless integrated tests to be conducted.
  • Merge the skills: The software development world is shifting left, which means testers /QA are no more viewed as a separate team. In-fact the test planning and configurations start right from the analysis phase. The testers are also expected to know engineering practices to a considerable level to work along with developers.
  • Challenges of testing in a cloud environment

    The next time you hear any IT Department /Organization saying “We are on the cloud” you can think of these manifold benefits they will reap from this strategy –
    Cost savings, Choice, and Agility, Reduction of on-site infrastructure, improved data backup services and disaster recovery, Data and applications always available from anywhere and workforce mobility, flexibility, and scalability, competitive advantage.

    According to Gartner, by 2020, ‘Cloud Shift’ will affect more than $ 1 trillion in IT spending, thus making cloud computing one of the most disruptive forces of IT spending. SaaS (Software as a Service) tops the list with 37% compared to other cloud computing service models (IaaS – Infrastructure as a service, Paas – Platform as a service)

    Testing in the cloud leverages cloud computing environment, thereby bringing the same benefits that the cloud brings to customers.

    Challenges in testing with Cloud environment has been one of the reasons why some organizations are not diving into cloud –

    Security: It’s no surprise that security is the biggest roadblock to cloud adoption. Many articles are written on the dark side of the cloud, puts ‘Security’ on top of their list.

    Third-party dependencies & Integration:
    Most of the time, the cloud applications will consume external API and services. For an end-user, any malfunctioning of a cloud service (hosted by you) will lead to questions raised on the cloud application being accessed. To avoid this, it’s essential to test all the API’s as if they are part of the application itself.

    Performance:
    Applications running on the cloud run on hardware that may also be hosting other applications, which may or may not be under your control. Ensuring performance and scalability is critical since the end-users always assume that the complete infrastructure is in your control. It’s good to configure monitoring on critical applications to learn about the breakpoint.

    Replicating the user environment: The main advantage of hosting on the cloud is to give users the freedom to access from anywhere and however, they want. Testers are expected to know all the possible scenarios in which a user would operate.

    On Demand Test/Developer construction: This is very much related to the above point on replicating user environment. Creating a development environment requires specific configuration associated with storage, servers, and network.

    Lack of standards: the cloud industry, though is moving fast and evolving technologically, some vendors have yet to implement consistent standards. This may affect testing practices.

    Regression testing issues and challenges: The multi-tenancy feature of clouds may cause difficulty in on-demand software regression testing.

    Selenium ByChained Class

    In this article, you are going to see an example of Selenium Webdriver ByChained class. Before jumping into the code, let’s understand what is ByChained class? ByChained class allows you to locate an element using its hierarchy in the DOM.

    <html>
    <body>
    <div id="div1">
    <div id="div2">
    <input type="text" id="txt1"/>
    </div>
    </div>
    </body>
    </html>  

    If you want to locate the textbox (txt1) from the above HTML using ByChained class, you need to pass ByChained object with By arguments in sequence. Note: You can also locate the element using XPath with DOM hierarchy.

    ByChained Class Example:

    driver.findElement(new ByChained(By.id("div2"),By.id("div1"),By.id("txt1"))).sendKeys("Codoid");  

    Hope it helps!

    Protractor Cucumber HTML Report

    Protractor Cucumber HTML Report

    Behavior-Driven Development helps us to test behaviors instead of implementations. We can use any BDD framework to follow Behavior-Driven Development. Generating HTML report after BDD scenarios execution is an important feature, and it helps to publish BDD result in a readable format.

    In this blog post, we will show you how to generate HTML report using Protractor and Cucumber.

    Configure Cucumber JSON format in conf.js

    Protractor Configuration File

    exports.config = {
      getPageTimeout: 60000,
      allScriptsTimeout: 500000,
      framework: 'custom',
      frameworkPath: require.resolve('protractor-cucumber-framework'),
      capabilities: {
        'browserName': 'chrome'
      },
    
      specs: [
        'features/*/*/*.feature'
      ],
    
      baseURL: 'https://google.com',
    
      cucumberOpts: {
        format: ['json:reports/results.json', 'pretty'],
        require: ['features/*/*/steps.js','features/support/*.js'],
        tags: true,
        profile: false,
        'no-source': true
      }
    };  

    Installing grunt-protractor-cucumber-html-report plugin

    Install grunt-protractor-cucumber-HTML-report plugin locally using the below command.

    npm install grunt-protractor-cucumber-html-report --save-dev  

    Create protractor-cucumber-html-report task in Gruntfile.js

    Sample Gruntfile.js with grunt-protractor-runner and protractor-cucumber-html-report tasks

    module.exports = function(grunt) {
      grunt.initConfig({
        protractor: {
          options: {
            configFile: "conf.js",
            keepAlive: true,
            noColor: false,
            args: {
    
            }
          },
          your_target: {
            options: {
              configFile: "conf.js",
              keepAlive: true,
              args: {
                seleniumServerJar: 'node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar',
                chromeDriver: 'node_modules/webdriver-manager/selenium/chromedriver_2.22'
              }
            }
          },
        },
    
      'protractor-cucumber-html-report': {
        default_options: {
          options: {
            dest: 'reports',//Where you want to generate the HTML report.
            output: 'report.html',//File Name
            testJSONDirectory: 'reports'//Mention where you have generated JSON format.
          }
        }
      },
    
    })
    
    grunt.loadNpmTasks('grunt-protractor-runner');
    grunt.loadNpmTasks('grunt-protractor-cucumber-html-report');
    
    grunt.registerTask('default', ['protractor:your_target','protractor-cucumber-html-report']);
    };
      

    Run registered Grunt tasks

    This command executes the default tasks which are registered in Gruntfile.js

    grunt default --cucumberOpts={"tags":"@smoke"}  

    View your report

    Once the Grunt tasks complete, you can see the HTML report in reports folder as mentioned in Gruntfile.js

    Folder Structure
    Protractorc Cucumber Project Structure

    Example
    Protractorc Cucumber HTML Report

    VNC Server Connection Using Sikuli

    VNC server can be connected using SikuliX. Once we invoke vncStart() method, it returns VNCScreen object. All you need to do is pass the below parameters while connecting your VNC server.

    Parameters:

    • ip – the server IP (default: 127.0.0.1 loopback/localhost)
    • port – the port number (default 5900)
    • connectionTimeout – seconds to wait for a valid connection (default 10)
    • timeout – the timout value in milli-seconds during normal operation (default 1000)

    Code

    VNCScreen vncscreen=org.sikuli.script.Sikulix.vncStart("127.0.0.1", 5900, 10, 1000);
    vncscreen.type("abc");
    vncscreen.find("xxx.png");
      

    Source: Connecting to a VNC Server (VNCScreen)