@@ -572,10 +572,13 @@ class HttpService {
572
572
scenarioGraph : ScenarioGraph ,
573
573
) : Promise < AxiosResponse < ValidationData > > {
574
574
const validationRequest : TestAdhocValidationRequest = {
575
- sourceParameters,
575
+ testData : {
576
+ type : "WITH_PARAMETERS" ,
577
+ sourceParameters : sourceParameters ,
578
+ } ,
576
579
scenarioGraph : this . #sanitizeScenarioGraph( scenarioGraph ) ,
577
580
} ;
578
- const promise = api . post ( `/scenarioTesting/${ encodeURIComponent ( scenarioName ) } /adhoc/ validate` , validationRequest ) ;
581
+ const promise = api . post ( `/scenarioTesting/${ encodeURIComponent ( scenarioName ) } /validate` , validationRequest ) ;
579
582
promise . catch ( ( error ) =>
580
583
this . #addError(
581
584
i18next . t ( "notification.error.failedToValidateAdhocTestParameters" , "Failed to validate parameters" ) ,
@@ -683,21 +686,6 @@ class HttpService {
683
686
return promise ;
684
687
}
685
688
686
- getTestFormParameters ( processName : string , scenarioGraph : ScenarioGraph ) {
687
- const promise = api . post (
688
- `/scenarioTesting/${ encodeURIComponent ( processName ) } /parameters` ,
689
- this . #sanitizeScenarioGraph( scenarioGraph ) ,
690
- ) ;
691
- promise . catch ( ( error ) =>
692
- this . #addError(
693
- i18next . t ( "notification.error.failedToGetTestParameters" , "Failed to get source test parameters definition" ) ,
694
- error ,
695
- true ,
696
- ) ,
697
- ) ;
698
- return promise ;
699
- }
700
-
701
689
getActionParameters ( processName : string ) {
702
690
const promise = api . get ( `/actionInfo/${ encodeURIComponent ( processName ) } /parameters` ) ;
703
691
promise . catch ( ( error ) =>
@@ -712,8 +700,11 @@ class HttpService {
712
700
713
701
generateTestData ( processName : string , testSampleSize : string , scenarioGraph : ScenarioGraph ) : Promise < AxiosResponse > {
714
702
const promise = api . post (
715
- `/scenarioTesting/${ encodeURIComponent ( processName ) } /generate/${ testSampleSize } ` ,
716
- this . #sanitizeScenarioGraph( scenarioGraph ) ,
703
+ `/scenarioTesting/${ encodeURIComponent ( processName ) } /generatedTestData` ,
704
+ {
705
+ scenarioGraph : this . #sanitizeScenarioGraph( scenarioGraph ) ,
706
+ numberOfSamples : + testSampleSize ,
707
+ } ,
717
708
{
718
709
responseType : "blob" ,
719
710
} ,
@@ -806,7 +797,7 @@ class HttpService {
806
797
data . append ( "testData" , file ) ;
807
798
data . append ( "scenarioGraph" , new Blob ( [ JSON . stringify ( sanitized ) ] , { type : "application/json" } ) ) ;
808
799
809
- const promise = api . post ( `/processManagement/test/${ encodeURIComponent ( processName ) } ` , data ) ;
800
+ const promise = api . post ( `/processManagement/test/${ encodeURIComponent ( processName ) } ?skipResultsPerTransition=true ` , data ) ;
810
801
promise . catch ( ( error : AxiosError ) =>
811
802
this . #addError(
812
803
i18next . t ( "notification.error.failedToTest" , "Failed to test due to: {{axiosError}}" , {
@@ -826,11 +817,14 @@ class HttpService {
826
817
) : Promise < AxiosResponse < TestProcessResponse > > {
827
818
const sanitized = this . #sanitizeScenarioGraph( scenarioGraph ) ;
828
819
const request = {
829
- sourceParameters : testData ,
820
+ testData : {
821
+ type : "WITH_PARAMETERS" ,
822
+ sourceParameters : testData ,
823
+ } ,
830
824
scenarioGraph : sanitized ,
831
825
} ;
832
826
833
- const promise = api . post ( `/processManagement/testWithParameters/ ${ encodeURIComponent ( processName ) } ` , request ) ;
827
+ const promise = api . post ( `/scenarioTesting/ ${ encodeURIComponent ( processName ) } /performTest?skipResultsPerTransition=true ` , request ) ;
834
828
promise . catch ( ( error : AxiosError ) =>
835
829
this . #addError(
836
830
i18next . t ( "notification.error.failedToTest" , "Failed to test due to: {{axiosError}}" , {
@@ -845,13 +839,17 @@ class HttpService {
845
839
846
840
testScenarioWithGeneratedData (
847
841
processName : ProcessName ,
848
- testSampleSize : string ,
842
+ testSampleSize : number ,
849
843
scenarioGraph : ScenarioGraph ,
850
844
) : Promise < AxiosResponse < TestProcessResponse > > {
851
- const promise = api . post (
852
- `/processManagement/generateAndTest/${ processName } /${ testSampleSize } ` ,
853
- this . #sanitizeScenarioGraph( scenarioGraph ) ,
854
- ) ;
845
+ const request = {
846
+ testData : {
847
+ type : "WITH_GENERATED_DATA" ,
848
+ numberOfSamples : testSampleSize ,
849
+ } ,
850
+ scenarioGraph : this . #sanitizeScenarioGraph( scenarioGraph ) ,
851
+ } ;
852
+ const promise = api . post ( `/scenarioTesting/${ encodeURIComponent ( processName ) } /performTest?skipResultsPerTransition=true` , request ) ;
855
853
promise . catch ( ( error : AxiosError ) =>
856
854
this . #addError(
857
855
i18next . t ( "notification.error.failedToGenerateAndTest" , "Failed to generate and test due to: {{axiosError}}" , {
0 commit comments