Components Errors

Print

Message: "There are more than one BDD Methods with the name componentName.methodName. You cannot have two or more  methods with the same name."

Reason:  A BDD Component cannot have more than one BDD Method with the same name. The overloading by changing the parameters is not permitted.

How to fix it: Rename the methods.

 

Message: "The field componentName.fieldName is not an array."

Reason: You are trying to configure a ParametersValueStorage field, but the type of the field is not an array.

How to fix it: add the array declaration on the field or delete the attribute [ParametersValuesStorage]

 

Message: "The component componentName has more than one ParametersValuesStorage for the type typeName".

Reason: You are trying to declare another ParametersValuesStorage field for the same type.

How to fix it: Delete one of the declaration. If one of them is placed inside the DynamicBDDComponent class, delete the other declaration. It could be that you are trying to declare a field using an alias for another type already declared (Ex. int, System.Int32).

 

Message: "The field componentName.fieldName is not public but it has not the [SerializedField] attribute. The inspector is not going to manage it."

Reason: You forgot to add the [SerializedField] attribute on the field declaration.

How to fix it: add the [SerializedField] attribute to the field declaration.

 

Message: "There is not ParametersValuesStorage for the type ###type for the parameter parameterName for the method componentName.methdoName".

Reason: BDD Extension Framework cannot locate a ParametersValuesStorage field for the indicated type in the BDD Component.

How to fix it: Check the declarations of your ParametersValuesStorage fields. They have to have the attribute [ParametersValuesStorage] and the attribute [SerializeField]. Create the ParametersValuesStorage field.

 

Message:  "The method componentName.methodName does not return an IAssertionResult value."

Reason: "The return value of the indicated method is not "IAssertionResult".

How to fix it: Change the return value into "IAssertionResult".

 

Message:  "Method componentName.methodName not found. It is referenced in a CallBefore attribute for the method componentName.otherMethodName".

Reason: The BDD Extension Framework cannot locate the method indicated inside the BDD Component. It could be:

How to fix it:

 

 

Message: "The method componentName.methodName has a CallBefore attribute but it is not a BDD Method."

Reason: The method decorated with the attribute [CallBefore] is not declared as BDD Method.

How to fix it: change the declaration or delete the [CallBefore] attribute.

 

Message: "The method componentName.methodName has a wrong value for CallBefore.ExecutionOrder: n. It must be >0".

Reason: The value indicated is 0;

How to fix it: change it with a value>0

 

Message: "The method componentName.methodName has duplicated CallBefore.ExecutionOrder: n".

Reason: For the same BDD Method there are at least two [CallBefore] attribute with the same value of the parameter.

How to fix it: change the values. They have to be unique.

 

Message: "The method componentName.methodName  has a missing CallBefore.ExecutionOrder: n".

Reason: There is not a [CallBefore] attribute for the indicated method with the indicated value, but there is another [CallBefore] attribute with a greater value.

How to fix it: change the values of the parameter of the [CallBefore] attribute. Their numbering has to be sequential.



Message: "The method componentName.methodName has a recursive call. Recursive calls are not allowed. Call chain: TxTxTxTxTx."

Reason: The method indicated can obtain another call of itself following the nested calls of its [CallBefore] attributes. The recursive calls are not permitted.

How to fix it: Read the error text to find where the recursion is placed and correct the [CallBefore] attributes to avoid recursions.

 

Message: "The CallBefore chains declared for the method componentName.methodName have a non-unique identification for the parameters of the method identified by the key: componentName.methodName.parameterName.Ids. Please, use the Id property in the CallBefore attributes for making them unique."

Reason: If a BDD Method with parameters is called more than one time using the [CallBefore] attributes by a BDD Method, the BDD Extension Framework has difficulties to manage the values of the parameters.

How to fix it: Add the property Id in each [CallBefore] attribute using different arbitrary string.

 

Message:  "The [Given|When|Then] declaration for the method componentName.methodName has a wrong ExecutionOrder value: it must be >0".

Reason: The value for the executionOrder parameter has to be >0 for being interpreted correctly by the BDD Extension Framework.

How to fix it: change the value of the parameter with a numeric>0.



Message: "The [Given|When|Then] declaration for the method componentName.methodName has a duplicate ExecutionOrder value. Check the others  [Given|When|Then] methods.";

Reason: for each Step Type (Given, When or Then) the numbering of the parameter ExecutionOrder has to be sequential without repetition.

How to fix it: change the values of the ExecutionOrder parameters to make them unique.

 

Message: "The component componentName has a missing [Given|When|Then].ExecutionOrder: n."

Reason: There is not a Step Method for the type indicated that has the ExecutionOrder parameter set to the value n, but there is another ExecutionOrder that has a value greater than n.

How to fix it:

 

Message: "The component componentName has not [Given|When|Then] components".

Reason: The BDD Extension Framework cannot locate a method inside the indicated component with the [Given|When|Then] declaration. There must be at least one Step Method for each Step Type.

How to fix it: Create a BDD Method for the indicated Step Type.

 

Message: "The method componentName.methodName is not allowed to have parameters".

Reason: The Static Components are not allowed to have BDD methods with parameters.

How to fix it: delete the parameters from the signature of the indicated method.

 

Back to: BDD Framework: Error and problems handling Read next: Runner errors