Category Archives: apache

Jmeter is known for Performance and Functional testing tools for Web, but Jmeter can also record scripts for Mobile Applications. You can record and play script from Jmeter and quickly verify Mobile application performance and functional aspects. Jmeter has features to prepare and run our mobile specific performance test scripts. We need to do configuration on Jmeter and mobile devices.

What is mean by Performance:
In this case “performance” means “responsiveness”; i.e. when some user input occurs on your app how long does it take before the user sees the results of that action and can do something with them? When I tap “login” on my mobile banking app, how long before my account information is displayed; is it 200ms or is it 2s, and how much does that vary if I do it 20 times?
A very good recent Forrester report highlighted the key “performance” or “responsiveness” metrics as:
Time-to-render; i.e. how long until something appears on the screen that the user can see.
Time-to-interaction; i.e. how long until the user can do something with the update.

For IOS devices:
a.Go to Settings>Wi-Fi option.
b.Click on the connected network.
c.Select the ‘Manual’ option from HTTP Proxy section.
d.Set the ‘Server’ value as your computer’s IP address and ‘Port’ value to 8080 as JMeter configuration. For more see the below image.

Now, Start running on application whatever you want to run mobile device.Before running application Click the start button on HTTP(s) Test Script recorder in Jmeter.After Clicking on start button you will see one Root Certificate, Click on OK. See the below screenshot

JMeter Proxy Configuration:
1. Open JMeter and right-click the TestPlan>Add >Threads (Users)>Thread Group.


2. Right-click the Thread group>Add>Logic Controller>Recording Controller.


3. Right-click the Threads>Add>Listener>View Results Tree.


4. Add test script recorder by selecting Add>Non-Test Elements>HTTP(S) Test Script Recorder option.


5. Add ‘8080’ as Port value and click the Start button. This will start the JMeter proxy on localhost.
Note: The same port value is should be configured in mobile device too

6. On clicking the “START” button you may get some Root CA Certificate message dialogue. Just click the “OK” button.


7.Once you start running your application, the steps of the script will be recorded under “Recording Controller”.
Here I have ran our application HariOme.. Performed some action in app like login, Calander and Click on stop button in tool.
Exapand Recording Controller and see all the recorded steps are displayed

The below scripts are recorded in jmeter tool. Once it got recoreded execute the recored scripts

8.Now click the ‘Play’ button displayed in green.
9.Click the ‘View Result Tree’.
10.Here you will see the execution result of your script

In the view Result we are seeing some warnings.. Those are our app related Issues. This is the sample example for recording the scripts.

Installing Drill on Windows

Download the latest version of Apache Drill: http://www.apache.org/dyn/closer.cgi/drill/drill-1.4.0/apache-drill-1.4.0.tar.gz
Move the downloaded file to a directory where you want to install Drill.
Unzip the GZ file using a third-party tool. If the tool you use does not unzip the underlying TAR file as well as the GZ file, perform a second unzip to extract the Drill software. The extraction process creates the installation directory containing the Drill software.

Start the Drill shell using the sqlline command. Complete the following steps to launch the Drill shell:

  1. Open Command Prompt.
  2. Navigate to the Drill installation folder.
  3. Go to the bin directory. For example:
    cd bin
  4. Type the following command on the command line: sqlline.bat -u "jdbc:drill:zk=local" 

    Querying a JSON File
    A sample JSON file, employee.json, contains fictitious employee data. To view the data in the employee.json file, submit the following SQL query to Drill, using the cp (classpath) storage plugin configuration to point to the file.0: jdbc:drill:zk=local> SELECT * FROM cp.employee.json LIMIT 3;
    drillexce

 

==============================================================================

If we are using Amazon clusters for hadoop, here is steps to install Drill

Installation:-

1.copy “installDrill.rb” file to /home/hadoop

2. run the below command on all nodes of cluster
ruby installDrill.rb

3. configure storage plugin
a. connect to http://<public dsn name>:8047
b. select “storage” tab
c. click on dfs button
d. change the following property
“connection”: “hdfs://<ipaddress of the >:9000”
e. click on “update” button

4. create a directory under hdfs file system
hdfs dfs -mkdir -p /home/hadoop/care-json
move the json file under “/home/hadoop/care-json”
hdfs dfs -copyFromLocal schandu/* /home/hadoop/care-json

5. run the below queries from browser.
a. connect to http://<public dsn name>:8047
b. select on “Query” tab
c. select * from dfs.root./home/hadoop/care-json

6. connect from command line to drill as well
/home/hadoop/drill/bin/sqlline -u jdbc:drill:10.74.2.33

Here is sample Json file:

sample Quries:-
SELECT * FROM dfs.complex_student.json limit 10
SELECT * FROM dfs.json.employee.json limit 10
SELECT * FROM dfs.region.parquet limit 10

quries from directories:-
SELECT * FROM owndfs./home/hadoop/parquet limit 10
SELECT * FROM owndfs./home/hadoop/json-data limit 10
SELECT * FROM owndfs./home/hadoop/care-json limit 10

 

1.Install Apache,PHP and Mysql on your machine using the below command on the terminal

2.Open your host file in the below directory:

Edit this file to map your sites

 

3.Configure Apache
From the terminal create the new file using below command:

Type the below line in the new file:

 

4. Enable sites in apache2 and restart apache2

Let us enable your site using the below command on the terminal

Now let us restart and reload apache2 using the command:

 

Once Apache successfully restarts you’re pretty much done and ready to roll.

Lets quickly enable virtual hosts and mod proxy to tomcat in few quick steps.  assuming that apache is already installed and you have an app running on tomcat.

  • Lets create a simple virtual hosts file that works on both port 80 and ssl 443. “sudo vi /private/etc/apache2/extra/httpd-vhosts.conf
<Virtualhost *:80>
ServerName site.nbostech.com

ErrorLog "/private/var/log/apache2/site.nbostech.com-error_log"
CustomLog "/private/var/log/apache2/site.nbostech.com-access_log" common
RewriteEngine on

# rewrite everything to HTTPS
RewriteRule ^(.*)$ https://site.nbostech.com$1 [R=301,L]

ProxyPreserveHost On
ProxyPass / http://localhost:8080/

</Virtualhost>

<Virtualhost *:443>
ServerName site.nbostech.com

ErrorLog "/private/var/log/apache2/site.nbostech.com-ssl_error_log"
CustomLog "/private/var/log/apache2/site.nbostech.com-ssl_access_log" common
RewriteEngine on

SSLEngine on
SSLHonorCipherOrder on
SSLProtocol all -SSLv2
SSLCipherSuite RC4-SHA:HIGH:!ADH
SSLCertificateFile /private/etc/apache2/extra/nbos.server.crt
SSLCertificateKeyFile /private/etc/apache2/extra/nbos.server.key

ProxyPreserveHost On
ProxyPass / http://localhost:8080/

</Virtualhost>
  • create a self signed ssl certificates for the SSL config above..

openssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 -nodes \
  -keyout /private/etc/apache2/extra/nbos.server.key \
  -out /private/etc/apache2/extra/nbos.server.crt \
  -subj '/O=Company/OU=Department/CN=nbos.nbostech.com'

  • enable virtual hosts in httpd.conf “sudo vi /etc/apache2/httpd.conf”. uncomment the following line

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

  • if the server is not in DNS add the entry to your hosts file “sudo vi /etc/hosts

127.0.0.1       site.nbostech.com