API自動化測試總結
posted @ 2014-09-04 09:41 順其自然EVO 閱讀(259) | 評論 (0) | 編輯 收藏
blog已經轉移至github,大家請訪問 http://qaseven.github.io/
posted @ 2014-09-04 09:41 順其自然EVO 閱讀(259) | 評論 (0) | 編輯 收藏
posted @ 2014-09-04 09:41 順其自然EVO 閱讀(201) | 評論 (0) | 編輯 收藏
package com.mq.rabbitmq.rabbitmqtest; import java.util.Date; import com.rabbitmq.client.ConnectionFactory; import com.rabbitmq.client.Connection; import com.rabbitmq.client.Channel; import com.rabbitmq.client.QueueingConsumer; public class ReceiveTest { private final static String QUEUE_NAME = "ftpAgent"; private final static String userName = "admin"; private final static String password = "admin"; private final static String virtualHost = "/"; private final static int portNumber = 5672; private final static String hostName = "master"; private final static String host = "192.168.174.132"; public static void main(String[] argv) throws java.io.IOException, java.lang.InterruptedException { ConnectionFactory factory = new ConnectionFactory(); // factory.setHost("192.168.174.160"); factory.setUsername(userName); factory.setPassword(password); // factory.setVirtualHost(virtualHost); factory.setHost(host); factory.setPort(portNumber); Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); // channel.queueDeclare(QUEUE_NAME, false, false, false, null); System.out.println(" [*] Waiting for messages. To exit press CTRL+C"); QueueingConsumer consumer = new QueueingConsumer(channel); channel.basicConsume(QUEUE_NAME, true, consumer); Date nowTime = new Date(); while (true) { QueueingConsumer.Delivery delivery = consumer.nextDelivery(); String message = new String(delivery.getBody()); System.out.println("RecieveTime: " + nowTime); System.out.println(" [x] Received '" + message + "'"); } } } |
package com.mq.rabbitmq.rabbitmqtest; import java.util.Date; import com.rabbitmq.client.ConnectionFactory; import com.rabbitmq.client.Connection; import com.rabbitmq.client.Channel; import com.rabbitmq.client.QueueingConsumer; public class ReceiveTest { private final static String QUEUE_NAME = "ftpAgent"; private final static String userName = "admin"; private final static String password = "admin"; private final static String virtualHost = "/"; private final static int portNumber = 5672; private final static String hostName = "master"; private final static String host = "192.168.174.132"; public static void main(String[] argv) throws java.io.IOException, java.lang.InterruptedException { ConnectionFactory factory = new ConnectionFactory(); // factory.setHost("192.168.174.160"); factory.setUsername(userName); factory.setPassword(password); // factory.setVirtualHost(virtualHost); factory.setHost(host); factory.setPort(portNumber); Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); // channel.queueDeclare(QUEUE_NAME, false, false, false, null); System.out.println(" [*] Waiting for messages. To exit press CTRL+C"); QueueingConsumer consumer = new QueueingConsumer(channel); channel.basicConsume(QUEUE_NAME, true, consumer); Date nowTime = new Date(); while (true) { QueueingConsumer.Delivery delivery = consumer.nextDelivery(); String message = new String(delivery.getBody()); System.out.println("RecieveTime: " + nowTime); System.out.println(" [x] Received '" + message + "'"); } } } |
posted @ 2014-09-04 09:40 順其自然EVO 閱讀(669) | 評論 (0) | 編輯 收藏
posted @ 2014-09-04 09:40 順其自然EVO 閱讀(230) | 評論 (0) | 編輯 收藏
sqlplus -s n1/n1 <<EOF set linesize 150 set pages 0 set feedback off spool check_$1.sh select 'ksh 12c.sh'||w||' '||t||' '||l||' '||rw||' '||rt||' '||rl||' ' from data where r=-1 and startdate='$1'; spool off; EOF ksh check_$1.sh |tee check_$1.log grep suggest check_$1.log |awk '{print $7" "$8" "$9" "$10" "$11" "$12" "$1" "$2" "$3" "$4" "$5" "$6}'>>filter_check.log cat filter_check.log function get_result { echo $1 sqlplus -s n1/n1 <<EOF set pages 0 select case when zhu>ke+1 then rpad('big win:',20)||to_number(w+rw)||' '||'$2'||','||'$3'||','||'$4'||','||'$5'||','||'$6'||','||'$7' when zhu=ke+1 then rpad('little win:',20)||to_number(w+rt)||' '||'$2'||','||'$3'||','||'$4'||','||'$5'||','||'$6'||','||'$7' when zhu=ke then rpad('tie:',20)||to_number(t+rl)||' '||'$2'||','||'$3'||','||'$4'||','||'$5'||','||'$6'||','||'$7' when zhu=ke-1 then rpad('little lose:',20)||to_number(l+rl)||' '||'$2'||','||'$3'||','||'$4'||','||'$5'||','||'$6'||','||'$7' when zhu<ke-1 then rpad('big lose:',20)||to_number(l+rl)||' '||'$2'||','||'$3'||','||'$4'||','||'$5'||','||'$6'||','||'$7' end end from data where startdate='$1' and w=$2 and t=$3 and l=$4 and rw=$5 and rt=$6 and rl=$7 order by (zhu-ke); EOF } while read line do echo ---start echo $line input_params=`echo $line|awk '{print $1" "$2" "$3" "$4" "$5" "$6}'` get_result $1 $input_params echo ....end echo . done <filter_check.log rm check_$1.log rm filter_check.log rm check_$1.sh |
posted @ 2014-09-03 11:55 順其自然EVO 閱讀(156) | 評論 (0) | 編輯 收藏
Tomcat\bin中setclasspath.bat文件 rem --------------------------------------------------------------------------- rem Set CLASSPATH and Java options rem rem $Id: setclasspath.bat,v 1.6.2.1 2004/08/21 15:49:50 yoavs Exp $ rem --------------------------------------------------------------------------- rem Make sure prerequisite environment variables are set if not "%JAVA_HOME%" == "" goto gotJavaHome echo The JAVA_HOME environment variable is not defined echo This environment variable is needed to run this program goto exit :gotJavaHome if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome goto okJavaHome :noJavaHome echo The JAVA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program echo NB: JAVA_HOME should point to a JDK not a JRE goto exit :okJavaHome if not "%BASEDIR%" == "" goto gotBasedir echo The BASEDIR environment variable is not defined echo This environment variable is needed to run this program goto exit :gotBasedir if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir echo The BASEDIR environment variable is not defined correctly echo This environment variable is needed to run this program goto exit :okBasedir rem Set the default -Djava.endorsed.dirs argument set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed rem Set standard CLASSPATH rem Note that there are no quotes as we do not want to introduce random rem quotes into the CLASSPATH set CLASSPATH=%JAVA_HOME%\lib\tools.jar rem Set standard command for invoking Java. rem Note that NT requires a window name argument when using start. rem Also note the quoting as JAVA_HOME may contain spaces. set _RUNJAVA="%JAVA_HOME%\bin\java" set _RUNJAVAW="%JAVA_HOME%\bin\javaw" set _RUNJDB="%JAVA_HOME%\bin\jdb" set _RUNJAVAC="%JAVA_HOME%\bin\javac" goto end :exit exit /b 1 :end |
posted @ 2014-09-03 11:54 順其自然EVO 閱讀(341) | 評論 (0) | 編輯 收藏
mysql> select * from information_schema.global_variables; +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | VARIABLE_NAME | VARIABLE_VALUE | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | MAX_PREPARED_STMT_COUNT | 16382 | | INNODB_BUFFER_POOL_SIZE | 134217728 | | HAVE_CRYPT | YES | | PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE | 10000 | | INNODB_VERSION | 5.5.36 | | QUERY_PREALLOC_SIZE | 8192 | | DELAYED_QUEUE_SIZE | 1000 | | PERFORMANCE_SCHEMA_MAX_COND_INSTANCES | 1000 | | SSL_CIPHER | | | COLLATION_SERVER | utf8_general_ci | | SECURE_FILE_PRIV | | | TIMED_MUTEXES | OFF | | DELAYED_INSERT_TIMEOUT | 300 | | PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES | 1000000 | | LC_TIME_NAMES | en_US |
# The MySQL server [mysqld] port = 3306 socket = /tmp/mysql.sock skip-external-locking key_buffer_size = 384M max_allowed_packet = 1M table_open_cache = 512 sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 8M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size = 32M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 general_log_file = /data/mysql/mysql_2.log |
posted @ 2014-09-03 11:54 順其自然EVO 閱讀(307) | 評論 (0) | 編輯 收藏
posted @ 2014-09-03 11:53 順其自然EVO 閱讀(200) | 評論 (0) | 編輯 收藏
posted @ 2014-09-03 11:53 順其自然EVO 閱讀(178) | 評論 (0) | 編輯 收藏
posted @ 2014-09-03 11:52 順其自然EVO 閱讀(1497) | 評論 (0) | 編輯 收藏