? QA Design Gurus: Rollbase
Showing posts with label Rollbase. Show all posts
Showing posts with label Rollbase. Show all posts

Oct 23, 2015

Tip: How to get the IP Address of Raspberry Pi when performing IoT Testing

As a tester when we test any IOT application, we need to know the IP Address of  Raspberry Pi. Even if you know the IP Address when you test the application on another network, again you need to find the IP Address.

Generally, you can find the IP Address of your machine using ifconfig/ipconfig command if it is already connected to a network. To execute this command on Raspberry Pi, you need to connect using any command line tool like Putty. To connect Raspberry Pi using any command line tool you need IP Address.

Using the following ways you can get the IP Address of  Raspberry Pi.
  • Using IP scanner tool:- There are some IP Scanner tools available in the market. For this, your PC and Raspberry Pi should be on the same network.
            E.g. "Advanced IP Scanner"


Ref: http://goo.gl/16dqGb

  • Using Mobile App:- You can find the Raspberry Pi address in any home network easily using "Wifi Watch" mobile app. You can just connect the ethernet cable to Raspberry Pi and scan the network using this app. It lists the Raspberry Pi with it's IP Address.
Ref: https://goo.gl/24xIqZ


Above options will work only if you use the ethernet cable to connect the network. The network should connect automatically without typing any password.

If you use WiFi, to connect the network you need to type the password. One way of finding is, you should connect Raspberry Pi to TV using HDMI cable so that you can see the desktop. You need to connect Keyboard to type Wifi password. Once the network is connected you can type ifconfig command on the terminal to get the IP Address. Next time onwords you can use above mentioned tools to find the IP Address.

Instead of using these tools, we can get the IP Address automatically when Raspberry Pi is rebooted. 

Steps:

1) Write a Python script to find the IP Address
2)  Add logic to send the IP Address to an email or to any endpoint
3) Create a Cron job to run this python script on system reboot

Example:

In this example, we are sending IP Address to a cloud application built using Progress Rollbase. Python Script invokes a REST Service to send IP Address. Rollbase application triggers an email to user.

import socket
import os
import urllib2
gw = os.popen("ip -4 route show default").read().split()
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect((gw[2], 0))
ipaddr = s.getsockname()[0]
gateway = gw[2]
host = socket.gethostname()
response = urllib2.urlopen("https://www.rollbase.com/rest/api/login?loginName=xxxxx&password=xxxxx").read()
start = "<sessionId>"
end = "</sessionId>"
token=(response.split(start))[1].split(end)[0]
ipRequestString="https://www.rollbase.com/rest/api/create2?sessionId="+token+"&objName=configObj&ipaddress="+str(ipaddr)
print ipRequestString
urllib2.urlopen(ipRequestString).read()
print ("IP:", ipaddr, " GW:", gateway, " Host:", host)


Cron job:

To open Crontab editor in Vi Editor
Open terminal and execute export EDITOR=Vi
Execute "crontab -e". This will open a Vi Editor.  Enter the following line and  enter Esc + shift colon + w +  q to save the file.

@reboot sleep 60 /usr/bin/python /home/ipaddress.py



Sep 28, 2015

How to develop and TEST an IoT App using cloud dev platforms

As this is IoT Apps trend, I would like to tell you about a small IoT application. i.e. Switching an electrical bulb ON/OFF from a cloud application.

We used Rollbase application development platform. This platform has excellent feature called triggers. Using these triggers we can invoke external REST service. This platform also can be accessed from external system using REST services. I am sure Salesforce also has this kind of feature.

Software & Hardware Requirements:

1) Rollbase (http://www.rollbase.com)
2) Raspberry Pi 2
3) USB WiFi Dongle
4) Relay board
5) Some jumper Wires
6) Bulb and some home electric wires

High-level Steps:

1) Create an application in Rollbase
2) Create two buttons ON & OFF. (Required some Rollbase platform knowledge)
3) Create triggers and attach to ON and OFF buttons
4) Connect Raspberry Pi  to Wifi using WiFI Dongle
5) Connect Raspberry Pi & Relay board using Jumper wires
6) Connect Relay board with the Electrical bulb.
7) Write python scripts to switch ON/OFF the Electrical bulb.
8) Expose these python scripts as RESTful services
9) Invoke these scripts from Rollbase triggers.



We can also develop a Telerik Mobile app using this Rollbase application. We can invoke switching ON/OFF REST Services from Mobile App and through Rollbase application as well.

Now the challenge is how to test this kind of Application. We may figure out software bugs easily but detecting hardware defects is little difficult. We should have always extra wires and hardware. Once we double confirm that there are no software defects then we should try changing the wires and other hardware devices. Jumper Wires looks fine but may not work some times.

Jun 16, 2015

Are you storing test results in Database or in flat files? Try Rollbase. You can get better reports and you can save lot of time


After executing each test case/suite, we need to store test results somewhere. Generally we  store test results in a database, flat files or sending emails.

Generally higher management needs test results statistics like Daily, weekly, monthly..etc test reports.To provide these reports we need another application (may be a web application) which can read test results from Database, flat files, emails and display in a nice format. Sometimes we need to send test results statics in an email to higher management.

To develop this application QA need to spend lot of time and team required some development skills

In this case, you can try Rollbase

Rollbase is a platform as a service (PaaS) software solution. You can get rapid application development in the cloud, with minimal coding. Build, deploy and manage cloud-based applications with a single tool designed to get you up and productive fast.

Rollbase is a cloud application. Rollbase provides REST API to create records.



Rollbase has many features like Charts, Gauges..etc. Using these features you can display test results in the better format.

Rollbase has other features like batch jobs and triggers. Using these features you can automate the process of getting test results analytics.

Rollbase also supports sending emails, SMS, mobile app so that you can get the report anytime and anywhere

You can also build a dashboard to see the Live results in a single page

May 29, 2015

Need to do large scale email analytics? Don't worry Rollbase can help you



Now a days people are busy. We don't want to use multiple applications.We want every thing on emails. 

For example: Forum Questions.

Employees can log into Forum application and they can reply but employees are happy if they get forum questions via email and they are happy to give reply via email.

Higher management  want every thing in email like weekly status, monthly status, daily discussions...etc

Of course we use rules/filters to move emails to separate folders 


After some years will have lot of emails. If we want generate some analytics based on a component or a word. Rollbase can help you.

Rollbase is a platform as a service (PaaS) software solution. You can get rapid application development in the cloud, with minimal coding. Build, deploy and manage cloud-based applications with a single tool designed to get you up and productive fast.

Rollbase provides API to read emails. You can write your own logic in JavaScript

http://documentation.progress.com/output/Rollbase/index.html#page/rb/email-api.html

Example
rbv_api.openPOP3("mail.mydomain.com", 995, "address@mydomain.com", password, null);
var arr = rbv_api.getMailMessages(100, 110);
for (var k=0; k<arr.length; k++) {
var m = arr[k];
rbv_api.println(m.get('subject'));
}
rbv_api.closeMailSession();

After writing logic to filter out emails using Rollbase other APIs you can create records in Rollbase system. Once you get data in Rollbase then you can utilize Rollbase features like Charts, Reports.

You can use batch jobs to run your logic daily and get live email analytics

Finally you can get analyzed report as a email