2016-12-19 4 views
0

이것은 아마도 간단 할 수 있지만 기본 테스트 링이 내 테스트에서 작동하지 않는 이유를 찾을 수 없습니다.개틀링 루프가 작동하지 않음

루프 (반복 카운터, 지속 시간)를 정의하는 방법에 관계없이 내 단순한 시나리오는 항상 각 사용자마다 한 번 실행됩니다.

테스트 코드 :

import io.gatling.core.Predef._ 
import io.gatling.http.Predef._ 

class RecordedSimulation extends Simulation { 

    object Browse { 

    val browse = exec(
     http("Getting category times") 
     .get("http://localhost:8080/category/cat_1") 
    ) 
    } 

    val scn = scenario("My scenario").repeat(2000) { 
    exec(Browse.browse) 
    } 

    setUp(
    scn.inject(atOnceUsers(10)) 
) 


} 

대신 난 항상 10 (같음 "atOnceUsers)을보고하고 10 개 배 2000 통화보고 :

================================================================================ 
2016-12-19 17:10:18           25s elapsed 
---- My scenario --------------------------------------------------------------- 
[--------------------------------------------------------------------------] 0% 
      waiting: 0 /active: 10 /done:0  
---- Requests ------------------------------------------------------------------ 
> Global             (OK=10  KO=0 ) 
> Getting category times         (OK=10  KO=0 ) 
================================================================================ 


================================================================================ 
2016-12-19 17:10:23           30s elapsed 
---- My scenario --------------------------------------------------------------- 
[--------------------------------------------------------------------------] 0% 
      waiting: 0 /active: 10 /done:0  
---- Requests ------------------------------------------------------------------ 
> Global             (OK=10  KO=0 ) 
> Getting category times         (OK=10  KO=0 ) 
================================================================================ 


================================================================================ 
2016-12-19 17:10:24           31s elapsed 
---- My scenario --------------------------------------------------------------- 
[##########################################################################]100% 
      waiting: 0 /active: 0 /done:10  
---- Requests ------------------------------------------------------------------ 
> Global             (OK=10  KO=0 ) 
> Getting category times         (OK=10  KO=0 ) 
================================================================================ 

Simulation com.RecordedSimulation completed in 30 seconds 
Parsing log file(s)... 
Parsing log file(s) done 
Generating reports... 

================================================================================ 
---- Global Information -------------------------------------------------------- 
> request count           10 (OK=10  KO=0 ) 
> min response time          10 (OK=10  KO=- ) 
> max response time          43 (OK=43  KO=- ) 
> mean response time         19 (OK=19  KO=- ) 
> std deviation           9 (OK=9  KO=- ) 
> response time 50th percentile       16 (OK=16  KO=- ) 
> response time 75th percentile       21 (OK=21  KO=- ) 
> response time 95th percentile       35 (OK=35  KO=- ) 
> response time 99th percentile       41 (OK=41  KO=- ) 
> mean requests/sec         0.323 (OK=0.323 KO=- ) 
---- Response Time Distribution ------------------------------------------------ 
> t < 800 ms           10 (100%) 
> 800 ms < t < 1200 ms         0 ( 0%) 
> t > 1200 ms           0 ( 0%) 
> failed             0 ( 0%) 
================================================================================ 

답변

0

사용하신 개틀링 버전을 제공해 주시겠습니까? 2.2.1을 사용하고 코드가 작동합니다 (로그가 끝났습니다. 20000 OK 요청을 볼 수 있듯이)

================================================================================ 
2017-02-06 23:00:38           30s elapsed 
---- My scenario --------------------------------------------------------------- 
[--------------------------------------------------------------------------] 0% 
      waiting: 0 /active: 10 /done:0  
---- Requests ------------------------------------------------------------------ 
> Global             (OK=16582 KO=0 ) 
> Getting category times         (OK=16582 KO=0 ) 
================================================================================ 


================================================================================ 
2017-02-06 23:00:43           35s elapsed 
---- My scenario --------------------------------------------------------------- 
[##############------------------------------------------------------------] 20% 
      waiting: 0 /active: 8 /done:2  
---- Requests ------------------------------------------------------------------ 
> Global             (OK=19566 KO=0 ) 
> Getting category times         (OK=19566 KO=0 ) 
================================================================================ 


================================================================================ 
2017-02-06 23:00:45           36s elapsed 
---- My scenario --------------------------------------------------------------- 
[##########################################################################]100% 
      waiting: 0 /active: 0 /done:10  
---- Requests ------------------------------------------------------------------ 
> Global             (OK=20000 KO=0 ) 
> Getting category times         (OK=20000 KO=0 ) 
================================================================================ 

Simulation com.scenario.TestScenario completed in 36 seconds 
Parsing log file(s)... 
Parsing log file(s) done 
Generating reports... 

================================================================================ 
---- Global Information -------------------------------------------------------- 
> request count          20000 (OK=20000 KO=0 ) 
> min response time          8 (OK=8  KO=- ) 
> max response time         1064 (OK=1064 KO=- ) 
> mean response time         17 (OK=17  KO=- ) 
> std deviation           22 (OK=22  KO=- ) 
> response time 50th percentile       13 (OK=14  KO=- ) 
> response time 75th percentile       17 (OK=17  KO=- ) 
> response time 95th percentile       30 (OK=30  KO=- ) 
> response time 99th percentile       53 (OK=53  KO=- ) 
> mean requests/sec        540.541 (OK=540.541 KO=- ) 
---- Response Time Distribution ------------------------------------------------ 
> t < 500 ms           19989 (100%) 
> 500 ms < t < 1000 ms         8 ( 0%) 
> t > 1000 ms           3 ( 0%) 
> failed             0 ( 0%) 
================================================================================