coreseek 測試用例

2021-10-04 00:17:45 字數 2060 閱讀 8546

準備材料

測試資料:article.sql

配置檔案:csft_mysql.conf

php測試程式碼:test_coreseek.php

測試資料(sql)

create table `article` (

`id` int(11) not null auto_increment,

`title` varchar(255) collate utf8mb4_general_ci default null,

`content` text collate utf8mb4_general_ci,

`pub_date` int(11) default null,

primary key (`id`)

) engine=myisam auto_increment=4 default charset=utf8mb4 collate=utf8mb4_general_ci;

-- ----------------------------

-- records of article

-- ----------------------------

insert into `article` values ('1', '武漢疫情', '2023年初,武漢發生疫情,成為重災區', null);

insert into `article` values ('2', '武漢第一線', '疫情逐漸好轉', null);

insert into `article` values ('3', '上級指導思想', '公司領導統一安排', null);

配置檔案(code) csft_mysql.conf
#mysql資料來源配置,詳情請檢視:

#請先將var/test/documents.sql匯入資料庫,並配置好以下的mysql使用者密碼資料庫

#源定義

source mysql

#index定義

index mysql

#全域性index定義

indexer

#searchd服務定義

searchd

生成索引(shell)
d:/coreseek/bin/indexer -c d:/coreseek/etc/csft_mysql.conf --all

啟動coreseek服務(shell)

php 測試 (code)

<?php 

$word = $_get['w'] ?? "疫情";

require ( "sphinxapi.php" );

$cl = new sphinxclient ();

$cl->setserver ( '127.0.0.1', 9312);

$cl->setconnecttimeout ( 3 );

$cl->setarrayresult ( true );

$cl->setmatchmode ( sph_match_any);

$res = $cl->query ( $word, "*" );

echo "";

//print_r($cl);

print_r($res);

測試結果 (shell)
php d:\phpstudy\www\coreseek\index.php

測試用例(四)測試用例編寫

一.測試用例編寫方法 1.等價類劃分 如何選擇適當的資料子集,來代表整個資料集。通過降低測試的資料去實現 合理的 覆蓋,覆蓋了更多的可能資料,以發現更多的軟體缺陷 邊界值分析法 2.邊界值分析 使用邊界值分析方法設計測試用例時一般與等價類劃分結合起來,但它不是從乙個等價類中任選乙個例子作為代表,而是...

手機測試用例 STK測試用例

id 功能描述 操作步驟 預期結果 test time p fcomment tester test time p fcomment tester stk服務 sim卡適應性測試 1 選取支援stk功能的sim卡,插入手機中 手機應支援stk功能,會將stk選單自動加入主選單列表中 2 進入stk功...

手機測試用例 通話測試用例

id 功能描述 操作步驟 預期結果 test time p fcomment tester test time p fcomment tester 通話功能 快速檢視已撥 1 待機介面下按一下呼叫鍵可進入已撥 記錄 2 每次呼叫記錄都應正確無誤 號碼 時間 序號 通話時長等 3 呼叫記錄按呼叫時間順...