123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332 |
- <?xml version="1.0" encoding="UTF-8"?>
- <jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
- <hashTree>
- <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="顺德WMS@入库之全流程" enabled="true">
- <stringProp name="TestPlan.comments"></stringProp>
- <boolProp name="TestPlan.functional_mode">false</boolProp>
- <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
- <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
- <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
- <collectionProp name="Arguments.arguments"/>
- </elementProp>
- <stringProp name="TestPlan.user_define_classpath"></stringProp>
- </TestPlan>
- <hashTree>
- <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-本地环境" enabled="false">
- <collectionProp name="Arguments.arguments">
- <elementProp name="server" elementType="Argument">
- <stringProp name="Argument.name">server</stringProp>
- <stringProp name="Argument.value">127.0.0.1</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="port" elementType="Argument">
- <stringProp name="Argument.name">port</stringProp>
- <stringProp name="Argument.value">8085</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="wh_id" elementType="Argument">
- <stringProp name="Argument.name">wh_id</stringProp>
- <stringProp name="Argument.value">424279481503974579</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="system_key" elementType="Argument">
- <stringProp name="Argument.name">system_key</stringProp>
- <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTczODMwMCwiaWF0IjoxNzIzMTc0NjE0LCJqdGkiOiI0MjUwNjkzNDczNTU0OTgwMDkifQ.YrDCJklGXn7-jssCTWyIASDWjQ_TiYKLHGkLh1pb3F20GhOzTP1uz9hEul9LhdArk6Z6QtJB8c-ZcbtznbjxMfMWQvpl3wFwNiXNVozGxE6guwBwFj3cDyUdkbvutK6piLQGqaR8S8cE9rA_2D2xwA-kKh79NbGkNh8sBzdqFWmhnYqZxZTYD-I-GTSVYRw_LW_--Se-jBVjDX5U63wx4gaZQBvG-3XQiYGAWqZ63ywZ62n2gXc4HvZavsYJnq9WhlVPIU1YvsRwd0yaSDTkEBxVjBTLaUmMoTMlMtvvAiuywFU8U66VRThsXW3TIRSvPYfLqTgcsWxK4UDJy6OFOg</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="poLineNum" elementType="Argument">
- <stringProp name="Argument.name">poLineNum</stringProp>
- <stringProp name="Argument.value">5</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </Arguments>
- <hashTree/>
- <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-SD测试" enabled="true">
- <collectionProp name="Arguments.arguments">
- <elementProp name="server" elementType="Argument">
- <stringProp name="Argument.name">server</stringProp>
- <stringProp name="Argument.value">wms-system.test.sdl.com</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="port" elementType="Argument">
- <stringProp name="Argument.name">port</stringProp>
- <stringProp name="Argument.value">8000</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="wh_id" elementType="Argument">
- <stringProp name="Argument.name">wh_id</stringProp>
- <stringProp name="Argument.value">1000001</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="system_key" elementType="Argument">
- <stringProp name="Argument.name">system_key</stringProp>
- <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNjg2MTUwMCwiaWF0IjoxNzI0MzEyMDgxLCJqdGkiOiI0MzQ2MTExMDkwMTkyNjA0NzgifQ.Vor5psK98IdvpxcN1LNV2L0bXNnLHx6b5R4cKS2VwbywoWyfaUtHCXh1xv3qeCphy5GuSeXrvepTsQdXkt81l7Gx_4Lg-qUXs32mYhaclpFlvjhprcAx6cKm8_PgtSNWSEiWZ5gKP5dH3GWlaSxNQPviIY1SXIGdChUGkhwlFN-EXBBQTtJbMYHxhXjJwd3HCKfyH6qP1RYK4MN_lFd_mQRWnS3lCFrU4pd1aWaeqCowy8PNP4alAnzYQRbVL9yL8gItp2i6hIJggtDG83T5tBBE6euamN3jvXOM8O0tflxDL5oRVCX2I59Qo_F-LkrWsmm5pqBlegaWdlG8Ue1aEg</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="poLineNum" elementType="Argument">
- <stringProp name="Argument.name">poLineNum</stringProp>
- <stringProp name="Argument.value">100</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="sequence_start_value" elementType="Argument">
- <stringProp name="Argument.name">sequence_start_value</stringProp>
- <stringProp name="Argument.value">4000</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </Arguments>
- <hashTree/>
- <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-华为云" enabled="false">
- <collectionProp name="Arguments.arguments">
- <elementProp name="server" elementType="Argument">
- <stringProp name="Argument.name">server</stringProp>
- <stringProp name="Argument.value">122.9.140.63</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="port" elementType="Argument">
- <stringProp name="Argument.name">port</stringProp>
- <stringProp name="Argument.value">8006</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="wh_id" elementType="Argument">
- <stringProp name="Argument.name">wh_id</stringProp>
- <stringProp name="Argument.value">1000001</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="system_key" elementType="Argument">
- <stringProp name="Argument.name">system_key</stringProp>
- <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTk5NzUwMCwiaWF0IjoxNzIzNDQ3NTA5LCJqdGkiOiI0MjczNTg1NTc3MjY4NDAzNjQifQ.g5JO8RAqDcipomhOs9pmpfuz-b_nznlssihFY0pCpSPBpkd3L6dr6_FAX8g-oD_EpBoK3Ng_Lh9eqI06Wg2LftxzPn0AagQHmKVtUlY_vDJOQweAmoZRGSFL57xV-UVGI2pgY47nWZVbWS0iFu8s5LgzbvfZABNKfiYYR8VlfN7xL63jfxyjX1uCKxLvGWtzpxDnKWtxJshpBazxyR1qgUci1s2Q_mD9Ljxc2hiwopaizhCuIVytBjAvwS6nYKGqGbyKEdnFt5SFu5EctYkwrEjuk8wtAlGgAiUoT1wb2_JwiS9d_zh24CFYchjiAWrKgmHRSeWekRlszJV_se-Mtw</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="poLineNum" elementType="Argument">
- <stringProp name="Argument.name">poLineNum</stringProp>
- <stringProp name="Argument.value">2</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- <elementProp name="sequence_start_value" elementType="Argument">
- <stringProp name="Argument.name">sequence_start_value</stringProp>
- <stringProp name="Argument.value">103</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </Arguments>
- <hashTree/>
- <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="入库之全流程" enabled="true">
- <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
- <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
- <boolProp name="LoopController.continue_forever">false</boolProp>
- <stringProp name="LoopController.loops">10</stringProp>
- </elementProp>
- <stringProp name="ThreadGroup.num_threads">15</stringProp>
- <stringProp name="ThreadGroup.ramp_time">1</stringProp>
- <boolProp name="ThreadGroup.scheduler">false</boolProp>
- <stringProp name="ThreadGroup.duration">300</stringProp>
- <stringProp name="ThreadGroup.delay">0</stringProp>
- <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
- </ThreadGroup>
- <hashTree>
- <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
- <boolProp name="ResultCollector.error_logging">false</boolProp>
- <objProp>
- <name>saveConfig</name>
- <value class="SampleSaveConfiguration">
- <time>true</time>
- <latency>true</latency>
- <timestamp>true</timestamp>
- <success>true</success>
- <label>true</label>
- <code>true</code>
- <message>true</message>
- <threadName>true</threadName>
- <dataType>true</dataType>
- <encoding>false</encoding>
- <assertions>true</assertions>
- <subresults>true</subresults>
- <responseData>false</responseData>
- <samplerData>false</samplerData>
- <xml>false</xml>
- <fieldNames>true</fieldNames>
- <responseHeaders>false</responseHeaders>
- <requestHeaders>false</requestHeaders>
- <responseDataOnError>false</responseDataOnError>
- <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
- <assertionsResultsToSave>0</assertionsResultsToSave>
- <bytes>true</bytes>
- <sentBytes>true</sentBytes>
- <url>true</url>
- <threadCounts>true</threadCounts>
- <idleTime>true</idleTime>
- <connectTime>true</connectTime>
- </value>
- </objProp>
- <stringProp name="filename"></stringProp>
- </ResultCollector>
- <hashTree/>
- <ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="Response Time Graph" enabled="true">
- <boolProp name="ResultCollector.error_logging">false</boolProp>
- <objProp>
- <name>saveConfig</name>
- <value class="SampleSaveConfiguration">
- <time>true</time>
- <latency>true</latency>
- <timestamp>true</timestamp>
- <success>true</success>
- <label>true</label>
- <code>true</code>
- <message>true</message>
- <threadName>true</threadName>
- <dataType>true</dataType>
- <encoding>false</encoding>
- <assertions>true</assertions>
- <subresults>true</subresults>
- <responseData>false</responseData>
- <samplerData>false</samplerData>
- <xml>false</xml>
- <fieldNames>true</fieldNames>
- <responseHeaders>false</responseHeaders>
- <requestHeaders>false</requestHeaders>
- <responseDataOnError>false</responseDataOnError>
- <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
- <assertionsResultsToSave>0</assertionsResultsToSave>
- <bytes>true</bytes>
- <sentBytes>true</sentBytes>
- <url>true</url>
- <threadCounts>true</threadCounts>
- <idleTime>true</idleTime>
- <connectTime>true</connectTime>
- </value>
- </objProp>
- <stringProp name="filename"></stringProp>
- </ResultCollector>
- <hashTree/>
- <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
- <boolProp name="ResultCollector.error_logging">false</boolProp>
- <objProp>
- <name>saveConfig</name>
- <value class="SampleSaveConfiguration">
- <time>true</time>
- <latency>true</latency>
- <timestamp>true</timestamp>
- <success>true</success>
- <label>true</label>
- <code>true</code>
- <message>true</message>
- <threadName>true</threadName>
- <dataType>true</dataType>
- <encoding>false</encoding>
- <assertions>true</assertions>
- <subresults>true</subresults>
- <responseData>false</responseData>
- <samplerData>false</samplerData>
- <xml>false</xml>
- <fieldNames>true</fieldNames>
- <responseHeaders>false</responseHeaders>
- <requestHeaders>false</requestHeaders>
- <responseDataOnError>false</responseDataOnError>
- <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
- <assertionsResultsToSave>0</assertionsResultsToSave>
- <bytes>true</bytes>
- <sentBytes>true</sentBytes>
- <url>true</url>
- <threadCounts>true</threadCounts>
- <idleTime>true</idleTime>
- <connectTime>true</connectTime>
- </value>
- </objProp>
- <stringProp name="filename"></stringProp>
- </ResultCollector>
- <hashTree/>
- <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
- <boolProp name="ResultCollector.error_logging">false</boolProp>
- <objProp>
- <name>saveConfig</name>
- <value class="SampleSaveConfiguration">
- <time>true</time>
- <latency>true</latency>
- <timestamp>true</timestamp>
- <success>true</success>
- <label>true</label>
- <code>true</code>
- <message>true</message>
- <threadName>true</threadName>
- <dataType>true</dataType>
- <encoding>false</encoding>
- <assertions>true</assertions>
- <subresults>true</subresults>
- <responseData>false</responseData>
- <samplerData>false</samplerData>
- <xml>false</xml>
- <fieldNames>true</fieldNames>
- <responseHeaders>false</responseHeaders>
- <requestHeaders>false</requestHeaders>
- <responseDataOnError>false</responseDataOnError>
- <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
- <assertionsResultsToSave>0</assertionsResultsToSave>
- <bytes>true</bytes>
- <sentBytes>true</sentBytes>
- <url>true</url>
- <threadCounts>true</threadCounts>
- <idleTime>true</idleTime>
- <connectTime>true</connectTime>
- </value>
- </objProp>
- <stringProp name="filename"></stringProp>
- </ResultCollector>
- <hashTree/>
- <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
- <collectionProp name="HeaderManager.headers">
- <elementProp name="" elementType="Header">
- <stringProp name="Header.name">whId</stringProp>
- <stringProp name="Header.value">${wh_id}</stringProp>
- </elementProp>
- <elementProp name="" elementType="Header">
- <stringProp name="Header.name">systemkey</stringProp>
- <stringProp name="Header.value">${system_key}</stringProp>
- </elementProp>
- </collectionProp>
- </HeaderManager>
- <hashTree/>
- <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="User Data Config" enabled="true">
- <stringProp name="filename">./1001_user_data_config.csv</stringProp>
- <stringProp name="fileEncoding">UTF-8</stringProp>
- <stringProp name="variableNames">staff_id</stringProp>
- <boolProp name="ignoreFirstLine">false</boolProp>
- <stringProp name="delimiter">,</stringProp>
- <boolProp name="quotedData">false</boolProp>
- <boolProp name="recycle">true</boolProp>
- <boolProp name="stopThread">false</boolProp>
- <stringProp name="shareMode">shareMode.group</stringProp>
- </CSVDataSet>
- <hashTree/>
- <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Owner Data Config" enabled="true">
- <stringProp name="delimiter">,</stringProp>
- <stringProp name="fileEncoding">UTF-8</stringProp>
- <stringProp name="filename">./1002_owner_data_config.csv</stringProp>
- <boolProp name="ignoreFirstLine">false</boolProp>
- <boolProp name="quotedData">false</boolProp>
- <boolProp name="recycle">true</boolProp>
- <stringProp name="shareMode"></stringProp>
- <boolProp name="stopThread">true</boolProp>
- <stringProp name="variableNames">owner_id</stringProp>
- </CSVDataSet>
- <hashTree/>
- <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Supplier Data Config" enabled="true">
- <stringProp name="filename">./1003_supplier_data_config.csv</stringProp>
- <stringProp name="fileEncoding">UTF-8</stringProp>
- <stringProp name="variableNames">supplier_id</stringProp>
- <boolProp name="ignoreFirstLine">false</boolProp>
- <stringProp name="delimiter">,</stringProp>
- <boolProp name="quotedData">false</boolProp>
- <boolProp name="recycle">true</boolProp>
- <boolProp name="stopThread">false</boolProp>
- <stringProp name="shareMode">shareMode.group</stringProp>
- </CSVDataSet>
- <hashTree/>
- <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Sequence Counter" enabled="true">
- <stringProp name="CounterConfig.start">${sequence_start_value}</stringProp>
- <stringProp name="CounterConfig.end"></stringProp>
- <stringProp name="CounterConfig.incr">1</stringProp>
- <stringProp name="CounterConfig.name">sequence</stringProp>
- <stringProp name="CounterConfig.format">000000</stringProp>
- <boolProp name="CounterConfig.per_user">false</boolProp>
- </CounterConfig>
- <hashTree/>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Init Param" enabled="true">
- <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- vars.put("poItemList", util.toJson(new ArrayList()));
- //vars.put("asn_code", "ASN24080900059");</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
- </BeanShellSampler>
- <hashTree/>
- <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Po Line Loop" enabled="true">
- <boolProp name="LoopController.continue_forever">true</boolProp>
- <stringProp name="LoopController.loops">${poLineNum}</stringProp>
- </LoopController>
- <hashTree>
- <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Item Data Config" enabled="true">
- <stringProp name="delimiter">,</stringProp>
- <stringProp name="fileEncoding">UTF-8</stringProp>
- <stringProp name="filename">./1004_item_data_config.csv</stringProp>
- <boolProp name="ignoreFirstLine">false</boolProp>
- <boolProp name="quotedData">false</boolProp>
- <boolProp name="recycle">true</boolProp>
- <stringProp name="shareMode">shareMode.group</stringProp>
- <boolProp name="stopThread">true</boolProp>
- <stringProp name="variableNames">item_id,pack_id,qty</stringProp>
- </CSVDataSet>
- <hashTree/>
- <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Build Po Item Param" enabled="true">
- <stringProp name="cacheKey">true</stringProp>
- <stringProp name="filename"></stringProp>
- <stringProp name="parameters"></stringProp>
- <stringProp name="script">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- java.time.LocalDate currentDate = java.time.LocalDate.now();
- java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd");
- java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd");
- String lotNo = currentDate.format(formatter) + vars.get("sequence");
- int defaultPrice = 100;
- int defaultQty = vars.get("qty");
- String defaultManufacture = java.time.LocalDate.of(2024, 1, 1).format(formatter2);
- String defaultValidUntil = java.time.LocalDate.of(2024, 12, 31).format(formatter2);
- List poItemList = util.parseJson(vars.get("poItemList"), List.class);
- Map poItem = new HashMap();
- int poLineNo = Integer.parseInt(vars.get("__jm__Po Line Loop__idx")) + 1;
- poItem.put("poLineNo", poLineNo);
- poItem.put("itemId", vars.get("item_id"));
- poItem.put("packId", vars.get("pack_id"));
- poItem.put("price", defaultPrice);
- poItem.put("poQty", defaultQty);
- // 包装条码
- poItem.put("lot01", "");
- // 逻辑仓
- poItem.put("lot02", "01");
- // 越库单号
- poItem.put("lot03", "");
- // 生产日期
- poItem.put("lot04", defaultManufacture);
- // 有效期
- poItem.put("lot05", defaultValidUntil);
- // 批号
- poItem.put("lot06", "PNO" + lotNo + poLineNo);
- // 规格
- poItem.put("lot07", "");
- // 批准文号
- poItem.put("lot08", "PW" + lotNo + poLineNo);
- // 厂家
- poItem.put("lot09", "GALAXIS");
- // 产地
- poItem.put("lot10", "湖北省武汉市");
- poItemList.add(poItem);
- vars.put("poItemList", util.toJson(poItemList));</stringProp>
- <stringProp name="scriptLanguage">java</stringProp>
- </JSR223Sampler>
- <hashTree/>
- </hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Save Po Param" enabled="true">
- <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- java.time.LocalDate currentDate = java.time.LocalDate.now();
- java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd");
- java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd");
- String lotNo = currentDate.format(formatter) + vars.get("sequence");
- String bizCode = "SDIN" + lotNo;
- String defaultOrderType = "0100";
- String defaultOrderBizType = "C";
- Map po = new HashMap();
- po.put("wh_id", vars.get("wh_id"));
- po.put("owner_id", vars.get("owner_id"));
- po.put("supplier_id", vars.get("supplier_id"));
- po.put("biz_code", bizCode);
- po.put("order_type", defaultOrderType);
- po.put("order_biz_type", defaultOrderBizType);
- po.put("po_date", currentDate.format(formatter2));
- po.put("po_code", bizCode);
- po.put("po_staff_id", vars.get("staff_id"));
- po.put("remark", "压测数据");
- //int maxPoLine = 2;
- //int defaultPrice = 100;
- //int defaultQty = 1000;
- //String defaultManufacture = java.time.LocalDate.of(2024, 1, 1).format(formatter2);
- //String defaultValidUntil = java.time.LocalDate.of(2024, 12, 31).format(formatter2);
- //
- //List poItemList = new ArrayList();
- //for (int i = 1; i <= maxPoLine; i++) {
- // Map poItem = new HashMap();
- // poItem.put("poLineNo", i);
- // poItem.put("itemId", vars.get("itemId_" + i));
- // poItem.put("packId", vars.get("packId_" + i));
- // poItem.put("price", defaultPrice);
- // poItem.put("poQty", defaultQty);
- // // 包装条码
- // poItem.put("lot01", "");
- // // 逻辑仓
- // poItem.put("lot02", "01");
- // // 越库单号
- // poItem.put("lot03", "");
- // // 生产日期
- // poItem.put("lot04", defaultManufacture);
- // // 有效期
- // poItem.put("lot05", defaultValidUntil);
- // // 批号
- // poItem.put("lot06", "PNO" + lotNo + i);
- // // 规格
- // poItem.put("lot07", "");
- // // 批准文号
- // poItem.put("lot08", "PW" + lotNo + i);
- // // 厂家
- // poItem.put("lot09", "GALAXIS");
- // // 产地
- // poItem.put("lot10", "湖北省武汉市");
- // poItemList.add(poItem);
- //}
- vars.put("poId", util.toJson(po));
- vars.put("po", util.toJson(po));
- //vars.put("poItems", vars.get("poItemList"));</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
- </BeanShellSampler>
- <hashTree/>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Po@poSave8" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "po": ${po},
- "poItems": ${poItemList}
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/poOrderManagement/Po@poSave</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Po Id Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames"> poId</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Asn@extractPo" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "poIds": [
- "${poId}"
- ]
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/asn/Asn@extractPo</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Po Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">poInfo</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Code Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">asn_code</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.poMaster.asn_code</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Has Asn Code Controller" enabled="true">
- <stringProp name="IfController.condition">${__jexl3(${asn_code_matchNr} > 0)}</stringProp>
- <boolProp name="IfController.evaluateAll">false</boolProp>
- <boolProp name="IfController.useExpression">true</boolProp>
- </IfController>
- <hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Asn Commit Param" enabled="true">
- <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- Map poMap = util.parseJson(vars.get("poInfo"), Map.class);
- Map poMasterMap = poMap.get("poMaster");
- poMasterMap.put("staff_id", vars.get("staff_id"));
- poMasterMap.put("shipment_type", "0004");
- List poDetails = poMap.get("poDetails");
- for(int i = 0; i < poDetails.size(); i++){
- Map poDetail = poDetails.get(i);
- poDetail.put("asn_qty", poDetail.get("po_qty"));
- }
- Map asnCommitParam = new HashMap();
- asnCommitParam.put("asn", poMasterMap);
- asnCommitParam.put("asnItems", poDetails);
- asnCommitParam.put("withSubmit", true);
- vars.put("asnCommitParam", util.toJson(asnCommitParam));</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
- </BeanShellSampler>
- <hashTree/>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Asn@asnCommit" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- ${asnCommitParam}
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/asn/Asn@asnCommit</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
- <stringProp name="HTTPSampler.response_timeout">15000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- </hashTree>
- <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Asn Line Loop" enabled="true">
- <boolProp name="LoopController.continue_forever">true</boolProp>
- <stringProp name="LoopController.loops">${poLineNum}</stringProp>
- </LoopController>
- <hashTree>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@queryAsnInfo" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "asn_code": "${asn_code}",
- "lpn": null,
- "biz_code": null,
- "parent_code": null,
- "asn_id": 0,
- "asn_line_no": 0
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@queryAsnInfo</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">asn</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.asn</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Item Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">asn_item</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.asn_item</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Is Inspect Param" enabled="true">
- <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- Map asn = util.parseJson(vars.get("asn"), Map.class);
- vars.put("asn_id", String.valueOf(asn.get("asn_id")));
- Map asnItem = util.parseJson(vars.get("asn_item"), Map.class);
- vars.put("item_id", String.valueOf(asnItem.get("item_id")));
- </stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
- </BeanShellSampler>
- <hashTree/>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@isInspectByAsn" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "asn_id": "${asn_id}",
- "item_id": "${item_id}"
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@isInspectByAsn</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Is Inspect Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">is_inspect</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Save Receipt Item Param" enabled="true">
- <stringProp name="BeanShellSampler.query">import java.math.BigDecimal;
- import java.math.RoundingMode;
- com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- Map asn = util.parseJson(vars.get("asn"), Map.class);
- Map asnItem = util.parseJson(vars.get("asn_item"), Map.class);
- // log.info("asnItem > " + asnItem.get("asn_qty").getClass());
- // ASN单数量
- BigDecimal asnQty = new BigDecimal(asnItem.get("asn_qty"));
- // 已收货数量
- BigDecimal receiptQty = new BigDecimal(asnItem.get("receipt_qty"));
- // 已拒收数量
- BigDecimal receiptRejectQty = new BigDecimal(asnItem.get("receipt_reject_qty"));
- // 当前收货数量 = ASN单数量 - 已收货数量 - 已拒收数量
- BigDecimal currentReceiptQty = asnQty.subtract(receiptQty).subtract(receiptRejectQty);
- // 包装数量
- BigDecimal packMeas3 = new BigDecimal(String.valueOf(asnItem.get("pack_meas3")));
- // 整件数
- BigDecimal receiptPackQty = currentReceiptQty.divide(packMeas3, 0, RoundingMode.FLOOR);
- // 零散数
- BigDecimal receiptUnpackQty = currentReceiptQty.subtract(receiptPackQty.multiply(packMeas3));
- Map saveReceiptItemParam = new HashMap();
- saveReceiptItemParam.put("asn_id", String.valueOf(asn.get("asn_id")));
- saveReceiptItemParam.put("asn_line_no", String.valueOf(asnItem.get("asn_line_no")));
- saveReceiptItemParam.put("item_id", String.valueOf(asnItem.get("item_id")));
- saveReceiptItemParam.put("is_inspection", String.valueOf(vars.get("is_inspect")));
- saveReceiptItemParam.put("is_shuttle", "0000");
- saveReceiptItemParam.put("is_ctu", "0001");
- saveReceiptItemParam.put("is_device", "0000");
- //saveReceiptItemParam.put("is_chinese_medicine", "0001");
- saveReceiptItemParam.put("pack_id", String.valueOf(asnItem.get("pack_id")));
- saveReceiptItemParam.put("lot_id", String.valueOf(asnItem.get("lot_id")));
- saveReceiptItemParam.put("current_receipt_qty", currentReceiptQty.toString());
- saveReceiptItemParam.put("receipt_pack_qty", receiptPackQty.toString());
- saveReceiptItemParam.put("pack_intent", "0001");
- saveReceiptItemParam.put("receipt_unpack_qty", receiptUnpackQty.toString());
- saveReceiptItemParam.put("unpack_intent", "0001");
- vars.put("saveReceiptItemParam", util.toJson(saveReceiptItemParam));
- </stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
- </BeanShellSampler>
- <hashTree/>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@saveReceiptItem" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- ${saveReceiptItemParam}
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@saveReceiptItem</stringProp>
- <stringProp name="HTTPSampler.method">GET</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- </hashTree>
- </hashTree>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@queryInspect" enabled="false">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "path": "/com/galaxis/wms/inbound/acceptance/Acceptance",
- "pagination": true,
- "sqlId": "tab1_grid1QueryData",
- "limit": 50,
- "page": 1,
- "start": 0,
- "receipt_code": "${asn_code}",
- "customer_id": null,
- "order_biz_type": null,
- "receipt_id": null,
- "in_status": null,
- "condition": []
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid1QueryData</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Inspect Id Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">inspect_id</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data[*].inspect_id</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Is Inspect Controller" enabled="false">
- <stringProp name="IfController.condition">${__jexl3(${inspect_id_matchNr} > 0)}</stringProp>
- <boolProp name="IfController.evaluateAll">false</boolProp>
- <boolProp name="IfController.useExpression">true</boolProp>
- </IfController>
- <hashTree>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@queryInspectItem" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "path": "/com/galaxis/wms/inbound/acceptance/Acceptance",
- "pagination": true,
- "sqlId": "tab1_grid2QueryData",
- "limit": 10000,
- "page": 1,
- "start": 0,
- "inspect_id": "${inspect_id}",
- "condition": []
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid2QueryData</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Inspect Item Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">inspect_item_list</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.[*]</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">-1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="Acceptance ForEach" enabled="true">
- <stringProp name="ForeachController.inputVal">inspect_item_list</stringProp>
- <stringProp name="ForeachController.returnVal">inspect_item</stringProp>
- <boolProp name="ForeachController.useSeparator">true</boolProp>
- <stringProp name="ForeachController.startIndex">0</stringProp>
- <stringProp name="ForeachController.endIndex">${inspect_item_list_matchNr}</stringProp>
- </ForeachController>
- <hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Acceptance Param Sampler" enabled="true">
- <stringProp name="BeanShellSampler.query">import java.math.BigDecimal;
- import java.math.RoundingMode;
- com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- Map inspectItem = util.parseJson(vars.get("inspect_item"), Map.class);
- // 质检数量
- BigDecimal qty = new BigDecimal(inspectItem.get("qty"));
- // 已质检数量
- BigDecimal inspectQty = new BigDecimal(inspectItem.get("inspect_qty"));
- // 已拒收数量
- BigDecimal receiptQty = new BigDecimal(inspectItem.get("reject_qty"));
- // 需质检数量 = 质检数量 - 已质检数量 - 已拒收数量
- BigDecimal qualityQty = qty.subtract(inspectQty).subtract(receiptQty);
- // 包装数量
- BigDecimal packMeas = new BigDecimal(String.valueOf(inspectItem.get("pack_meas")));
- // 质检整件数
- BigDecimal qualityWholeQty = qualityQty.divide(packMeas, 0, RoundingMode.FLOOR);
- // 质检零散数
- BigDecimal qualityLessQty = qualityQty.subtract(qualityWholeQty.multiply(packMeas));
- Map saveInspectParam = new HashMap();
- saveInspectParam.put("inspect_id", String.valueOf(inspectItem.get("inspect_id")));
- saveInspectParam.put("inspect_line_nos", String.valueOf(inspectItem.get("inspect_line_nos")));
- saveInspectParam.put("item_id", String.valueOf(inspectItem.get("item_id")));
- saveInspectParam.put("pack_id", String.valueOf(inspectItem.get("pack_id")));
- saveInspectParam.put("lot_id", String.valueOf(inspectItem.get("lot_id")));
- saveInspectParam.put("quality_reject_qty", "0");
- saveInspectParam.put("is_chinese_medicine", String.valueOf(inspectItem.get("is_chinese_medicine")));
- saveInspectParam.put("quality_less_qty", qualityLessQty.toString());
- saveInspectParam.put("quality_whole_qty", qualityWholeQty.toString());
- saveInspectParam.put("quality_qty", qualityQty.toString());
- saveInspectParam.put("put_intent_less", "0001");
- saveInspectParam.put("put_intent_whole", "0001");
- saveInspectParam.put("quality_assert", "0001");
- saveInspectParam.put("quality_staff_id1", vars.get("staff_id"));
- vars.put("saveInspectParam", util.toJson(saveInspectParam));</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
- </BeanShellSampler>
- <hashTree/>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@inspectSave" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "form_data": ${saveInspectParam}
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/acceptance/Acceptance@inspectSave</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- </hashTree>
- </hashTree>
- </hashTree>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@queryPut" enabled="false">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "path": "/com/galaxis/wms/inbound/putAway/PutAway",
- "pagination": true,
- "sqlId": "queryPut",
- "limit": 50,
- "page": 1,
- "start": 0,
- "start_time": null,
- "end_time": null,
- "order_biz_type": null,
- "owner_name": null,
- "put_code": "${asn_code}",
- "receipt_code": null,
- "asn_code": null,
- "condition": []
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPut</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="put Id Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">put_id</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data[*].put_id</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="Debug Sampler" enabled="false">
- <boolProp name="displayJMeterProperties">false</boolProp>
- <boolProp name="displayJMeterVariables">true</boolProp>
- <boolProp name="displaySystemProperties">false</boolProp>
- </DebugSampler>
- <hashTree/>
- <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Has Put Id Controller" enabled="false">
- <stringProp name="IfController.condition">${__jexl3(${put_id_matchNr} > 0)}</stringProp>
- <boolProp name="IfController.evaluateAll">false</boolProp>
- <boolProp name="IfController.useExpression">true</boolProp>
- </IfController>
- <hashTree>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@queryPutItems" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "path": "/com/galaxis/wms/inbound/putAway/PutAway",
- "pagination": true,
- "sqlId": "queryPutItems",
- "limit": 10000,
- "page": 1,
- "start": 0,
- "put_id": "${put_id}",
- "condition": []
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPutItems</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Put Item Extractor" enabled="true">
- <stringProp name="JSONPostProcessor.referenceNames">put_item_list</stringProp>
- <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.[*]</stringProp>
- <stringProp name="JSONPostProcessor.match_numbers">-1</stringProp>
- </JSONPostProcessor>
- <hashTree/>
- </hashTree>
- <ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="Put ForEach" enabled="true">
- <stringProp name="ForeachController.inputVal">put_item_list</stringProp>
- <stringProp name="ForeachController.returnVal">put_item</stringProp>
- <boolProp name="ForeachController.useSeparator">true</boolProp>
- <stringProp name="ForeachController.startIndex">0</stringProp>
- <stringProp name="ForeachController.endIndex">${put_item_list_matchNr}</stringProp>
- </ForeachController>
- <hashTree>
- <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Put Param Sampler" enabled="true">
- <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
- Map putItem = util.parseJson(vars.get("put_item"), Map.class);
- Map commitPutawayParam = new HashMap();
- commitPutawayParam.put("put_id", String.valueOf(putItem.get("put_id")));
- commitPutawayParam.put("put_line_no", String.valueOf(putItem.get("put_line_no")));
- commitPutawayParam.put("item_id", String.valueOf(putItem.get("item_id")));
- commitPutawayParam.put("lot_id", String.valueOf(putItem.get("lot_id")));
- commitPutawayParam.put("pack_id", String.valueOf(putItem.get("pack_id")));
- commitPutawayParam.put("qty", String.valueOf(putItem.get("qty")));
- commitPutawayParam.put("put_pack_qty", String.valueOf(putItem.get("put_pack_qty")));
- commitPutawayParam.put("put_unpack_qty", String.valueOf(putItem.get("put_unpack_qty")));
- commitPutawayParam.put("put_code", String.valueOf(putItem.get("put_code")));
- commitPutawayParam.put("lpn", String.valueOf(putItem.get("lpn")));
- commitPutawayParam.put("loc_id", String.valueOf(putItem.get("loc_id")));
- vars.put("commitPutawayParam", util.toJson(Collections.singleton(commitPutawayParam)));</stringProp>
- <stringProp name="BeanShellSampler.filename"></stringProp>
- <stringProp name="BeanShellSampler.parameters"></stringProp>
- <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
- </BeanShellSampler>
- <hashTree/>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@commit" enabled="true">
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
- <collectionProp name="Arguments.arguments">
- <elementProp name="" elementType="HTTPArgument">
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
- <stringProp name="Argument.value">{
- "args": [
- {
- "put_details": ${commitPutawayParam}
- }
- ]
- }</stringProp>
- <stringProp name="Argument.metadata">=</stringProp>
- </elementProp>
- </collectionProp>
- </elementProp>
- <stringProp name="HTTPSampler.domain">${server}</stringProp>
- <stringProp name="HTTPSampler.port">${port}</stringProp>
- <stringProp name="HTTPSampler.protocol"></stringProp>
- <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
- <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/putAway/PutAway@commit</stringProp>
- <stringProp name="HTTPSampler.method">POST</stringProp>
- <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
- <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
- <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
- <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
- </HTTPSamplerProxy>
- <hashTree>
- <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
- <stringProp name="JSON_PATH">$.success</stringProp>
- <stringProp name="EXPECTED_VALUE">true</stringProp>
- <boolProp name="JSONVALIDATION">true</boolProp>
- <boolProp name="EXPECT_NULL">false</boolProp>
- <boolProp name="INVERT">false</boolProp>
- <boolProp name="ISREGEX">false</boolProp>
- </JSONPathAssertion>
- <hashTree/>
- </hashTree>
- </hashTree>
- </hashTree>
- </hashTree>
- </hashTree>
- </hashTree>
- </hashTree>
- </jmeterTestPlan>
|