## Configure eth0
## vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE="eth0"NM_CONTROLLED="yes"ONBOOT=yesHWADDR=A4:BA:DB:37:F1:04TYPE=EthernetBOOTPROTO=staticNAME="System eth0"UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03IPADDR=192.168.1.44NETMASK=255.255.255.0## Configure Default Gateway
## vi /etc/sysconfig/networkNETWORKING=yesHOSTNAME=centos6GATEWAY=192.168.1.1## Restart Network Interface
#/etc/init.d/network restart## Configure DNS Server
## vi /etc/resolv.confnameserver 8.8.8.8 # Replace with your nameserver ipnameserver 192.168.1.1 # Replace with your nameserver ip
Having knowledge on all telecom(VoIP) protocols, performance tools & test automation using java & python...
Search This Blog........
Friday, 17 June 2016
How to add eth0 interface in centos 6.x
Mobile App testing....
App testing
Android Testing
Unit Tests
Separating UI code from code logic is especially hard in Android. For example, an Activity is expected to act as a controller and view at the same time; make sure you keep this in mind when writing unit tests. Another useful recommendation is to decouple unit tests from the Android emulator, this will remove the need to build an APK and install it and your tests will run much faster. Robolectric is a perfect tool for this; it stubs the implementation of the Android platform while running tests.
Hermetic UI Tests
A hermetic UI test typically runs as a test without network calls or external dependencies. Once the tests can run in ahermetic environment, a white box testing framework like Espresso can simulate user actions on the UI and is tightly coupled to the app code. Espresso will also synchronize your tests actions with events on the UI thread, reducing flakiness. More information on Espresso is coming in a future Google Testing Blog article.
Diagram: Non-Hermetic Flow vs. Hermetic Flow
Monkey Tests
Monkey tests look for crashes and ANRs by stressing your Android application. They exercise pseudo-randomevents like clicks or gestures on the app under test. Monkey test results are reproducible to a certain extent; timing and latency are not completely under your control and can cause a test failure. Re-running the same monkey test against the same configuration will often reproduce these failures, though. If you run them daily against different SDKs, they are very effective at catching bugs earlier in the development cycle of a new release.
iOS Testing
Unit Tests
Unit test frameworks like OCUnit, which comes bundled with Xcode, or GTMSenTestcase are both good choices.
Hermetic UI Tests
KIF has proven to be a powerful solution for writing Objective-C UI tests. It runs in-process which allows tests to be more tightly coupled with the app under test, making the tests inherently more stable. KIF allows iOS developers to write tests using the same language as their application.
Following the same paradigm as Android UI tests, you want Objective-C tests to be hermetic. A good approach is to mock the server with pre-canned responses. Since KIF tests run in-process, responses can be built programmatically, making tests easier to maintain and more stable.
Monkey Tests
iOS has no equivalent native tool for writing monkey tests as Android does, however this type of test still adds value in iOS (e.g. we found 16 crashes in one of our recent Google+ releases). The Google+ team developed their own custom monkey testing framework, but there are also many third-party options available.
Backend Testing
A mobile testing strategy is not complete without testing the integration between server backends and mobile clients. This is especially true when the release cycles of the mobile clients and backends are very different. A replay test strategy can be very effective at preventing backends from breaking mobile clients. The theory behind this strategy is to simulate mobile clients by having a set of golden request and response files that are known to be correct. The replay test suite should then send golden requests to the backend server and assert that the response returned by the server matches the expected golden response. Since client/server responses are often not completely deterministic, you will need to utilize a diffing tool that can ignore expected differences.
To make this strategy successful you need a way to seed a repeatable data set on the backend and make all dependencies that are not relevant to your backend hermetic. Using in-memory servers with fake data or an RPC replay to external dependencies are good ways of achieving repeatable data sets and hermetic environments. Google+ mobile backend uses Guice for dependency injection, which allows us to easily swap out dependencies with fake implementations during testing and seed data fixtures.
Diagram: Normal flow vs Replay Tests flow
Conclusion
Mobile app testing can be very challenging, but building a comprehensive test strategy that understands the nature of different platforms and tools is the key to success. Providing a reliable and hermetic test environment is as important as the tests you write.
Finally, make sure you prioritize your automation efforts according to your team needs. This is how we prioritize on the Google+ team:
- Unit tests: These should be your first priority in either Android or iOS. They run fast and are less flaky than any other type of tests.
- Backend tests: Make sure your backend doesn’t break your mobile clients. Breakages are very likely to happen when the release cycle of mobile clients and backends are different.
- UI tests: These are slower by nature and flaky. They also take more time to write and maintain. Make sure you provide coverage for at least the critical paths of your app.
- Monkey tests: This is the final step to complete your mobile automation strategy.
Info about Asterisk...
How to Install Asterisk 11 on CentOS 6
For
this install I am using Asterisk 11.0.0 and will be compiling from
source on CentOS 6.5. This tutorial should also work on Fedora and RHEL
(Red Hat Enterprise Linux) systems with little or no modification.
First, you will want to be sure that your server OS is up to date.
yum update -y
Disable SELinux by changing “enforcing” to “disabled” in /etc/selinux/config. Use a text editor or copy and paste this command.
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
After you update and disable SELinux, you’ll need to reboot.
reboot
Next, you will want to resolve basic dependencies. (More information on Asterisk dependencies.)
yum install -y make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel
Change into the /usr/src/ directory to store your source code.
cd /usr/src/
Download the source tarballs. These commands will get the current release of DAHDI 2.6, libpri 1.4 and Asterisk 11.
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
OR
wget http://iindya.com/archive/packages/dahdi-linux-complete-current.tar.gz
wget http://iindya.com/archive/packages/libpri-1.4-current.tar.gz
wget http://iindya.com/archive/packages/asterisk-11-current.tar.gz
Extract the files from the tarballs.
tar zxvf dahdi-linux-complete*
tar zxvf libpri*
tar zxvf asterisk*
For the next set of commands it is important to follow the proper order: DAHDI first, then libpri, then Asterisk.
Install DAHDI.
cd /usr/src/dahdi-linux-complete*
make && make install && make config
Install libpri.
cd /usr/src/libpri*
make && make install
Change to the Asterisk directory.
cd /usr/src/asterisk*
In the next step, running the “configure” script will vary depending on whether your system is 32-bit or 64-bit. (Click here to know) When the menuselect command runs, select your options, then choose “Save and Exit” and the install will continue.
Use this command if you are installing Asterisk on 32bit CentOS.
./configure && make menuselect && make && make install
Use this command if you are installing Asterisk on 64bit CentOS.
./configure --libdir=/usr/lib64 && make menuselect && make && make install
Optional: If you ran into errors you will want to clean the install directory before recompiling.
make clean && make distclean
Once you have an error-free install, copy the sample files from the configs subdirectory into /etc/asterisk.
make samples
Then add the Asterisk start script to the /etc/init.d/ directory
make config
Start DAHDI.
service dahdi start
Start Asterisk.
service asterisk start
Connect to the Asterisk CLI.
asterisk -rvvv
Installing g.729 Codec
Move to the Asterisk modules directory. By default, it’s the following:
cd /usr/lib/asterisk/modules
Now
the tricky part, find out which binary you need to get the right module
for the right processor of your server. This almost always stumps me,
and I always end up downloading roughly two or three codecs before I get
the right one. Here’s something to help you out, so you don’t have to
make these mistakes:
uname -a
This let’s you know what type of server you got… But it’s reallllly complicated if you don’t know what you’re looking for!
Linux 2.boom.boom.pow.server 2.6.18-348.1.1.el5xen #1 SMP Tue Jan 22 17:00:37 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
Ok, so this will help you out ALOT MORE than the above. I don’t know what half of that stuff even means!!
cat /proc/cpuinfo
The above command will give you something like this:
[root@myserver ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
stepping : 10
cpu MHz : 1596.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips : 5866.85
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
stepping : 10
cpu MHz : 1596.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
Look at the section that tells you the model name, in my case it is:
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
Next, visit http://asterisk.hosting.lv/#bin,
and from the right hand side, select the Asterisk version that you
need PLUS THE version that matches your processor. For me it was:
However, these are the more popular selections (odd, none of my servers run any of the below, but whatever)
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-x86_64-core2.so
Ok, so next, you want to download them and install them in the Asterisk modules directory
cd /usr/lib/asterisk/modules
wget http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
So
that installs (read downloads) the codec into the modules directory of
your Asterisk install. Now to activate it! Simply rename it to
codec_g729 and you should be good to go!!
mv codec_g729-ast14-gcc4-glibc-pentium4.so codec_g729.so
Next, to ensure that your codec took, and is now working fully with Asterisk, restart Asterisk then login to if it is show up:
service asterisk restart
asterisk -vr
core show translation
The above command will vary from each version of Asterisk. The above works for 1.10 and 1.11
You should see something akin to this:
Move to the Asterisk modules directory. By default, it’s the following:
cd /usr/lib/asterisk/modules
Now
the tricky part, find out which binary you need to get the right module
for the right processor of your server. This almost always stumps me,
and I always end up downloading roughly two or three codecs before I get
the right one. Here’s something to help you out, so you don’t have to
make these mistakes:
uname -a
This let’s you know what type of server you got… But it’s reallllly complicated if you don’t know what you’re looking for!
Linux 2.boom.boom.pow.server 2.6.18-348.1.1.el5xen #1 SMP Tue Jan 22 17:00:37 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
Ok, so this will help you out ALOT MORE than the above. I don’t know what half of that stuff even means!!
cat /proc/cpuinfo
The above command will give you something like this:
[root@myserver ~]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz stepping : 10 cpu MHz : 1596.000 cache size : 3072 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm bogomips : 5866.85
processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz stepping : 10 cpu MHz : 1596.000 cache size : 3072 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
Look at the section that tells you the model name, in my case it is:
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
Next, visit http://asterisk.hosting.lv/#bin,
and from the right hand side, select the Asterisk version that you
need PLUS THE version that matches your processor. For me it was:
However, these are the more popular selections (odd, none of my servers run any of the below, but whatever)
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-x86_64-core2.so
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-x86_64-core2.so
Ok, so next, you want to download them and install them in the Asterisk modules directory
cd /usr/lib/asterisk/modules
wget http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
So
that installs (read downloads) the codec into the modules directory of
your Asterisk install. Now to activate it! Simply rename it to
codec_g729 and you should be good to go!!
mv codec_g729-ast14-gcc4-glibc-pentium4.so codec_g729.so
Next, to ensure that your codec took, and is now working fully with Asterisk, restart Asterisk then login to if it is show up:
service asterisk restart asterisk -vr core show translation
The above command will vary from each version of Asterisk. The above works for 1.10 and 1.11
You should see something akin to this:
Sunday, 29 May 2016
Robot framework
Robot framework (Python)
Robot Framework is a generic test automation framework for
acceptance testing and acceptance test-driven development
(ATDD).
Its testing
capabilities can be extended by test libraries implemented
either with Python or Java, and users can create new
higher-level keywords from existing ones using the same
syntax that is used for creating test cases.
Installation of Robot framework:
The following steps to install robot framework in Windows OS.
1) Download & Install python 2.7.x version from the below link and install it with "Run as Administrator"
----> Open the command prompt and check python version. Shown Below.
CMD: python --version
Note: Add the path to Window environmental variable
2) Install Robot framework using PIP command
CMD: pip install robotframwork
Check installation using the command shown in below pic.
CMD: pip install robotframework-selenium2library
Labels:
automation,
framework,
python,
robotframework,
telecom
Subscribe to:
Comments (Atom)


