├── .classpath ├── .gitignore ├── .project ├── .settings ├── org.eclipse.jdt.core.prefs └── org.eclipse.m2e.core.prefs ├── pom.xml ├── readme.md ├── spark-config.xml ├── src ├── main │ └── java │ │ ├── base │ │ ├── DriverInstance.java │ │ └── PageContext.java │ │ └── pages │ │ ├── HeaderPage.java │ │ ├── HomePage.java │ │ └── LoginPage.java └── test │ ├── java │ ├── features │ │ ├── addToCart.feature │ │ └── login.feature │ ├── hooks │ │ └── MyHooks.java │ ├── steps │ │ ├── AddToCartSteps.java │ │ ├── LoginPOMSD.java │ │ └── LoginSteps.java │ └── testRunner │ │ ├── LoginTestRunner.java │ │ └── ProductsTestRunner.java │ └── resources │ └── extent.properties └── testng.xml /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /test-output/ 3 | /CucumberReports/ 4 | /reports/ 5 | .project 6 | .settings/org.eclipse.jdt.core.prefs 7 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | letcodeCucumber 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | cucumber.eclipse.builder.stepdefinition 20 | 21 | 22 | 23 | 24 | cucumber.eclipse.builder.gherkin 25 | 26 | 27 | 28 | 29 | 30 | cucumber.eclipse.nature 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.m2e.core.maven2Nature 33 | 34 | 35 | 36 | 1665816115445 37 | 38 | 30 39 | 40 | org.eclipse.core.resources.regexFilterMatcher 41 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | enableParallelJavaIndexSearch=true 3 | org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled 4 | org.eclipse.jdt.core.builder.cleanOutputFolder=clean 5 | org.eclipse.jdt.core.builder.duplicateResourceTask=warning 6 | org.eclipse.jdt.core.builder.invalidClasspath=abort 7 | org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore 8 | org.eclipse.jdt.core.builder.resourceCopyExclusionFilter= 9 | org.eclipse.jdt.core.circularClasspath=warning 10 | org.eclipse.jdt.core.classpath.exclusionPatterns=enabled 11 | org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error 12 | org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled 13 | org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error 14 | org.eclipse.jdt.core.codeComplete.argumentPrefixes= 15 | org.eclipse.jdt.core.codeComplete.argumentSuffixes= 16 | org.eclipse.jdt.core.codeComplete.camelCaseMatch=enabled 17 | org.eclipse.jdt.core.codeComplete.deprecationCheck=disabled 18 | org.eclipse.jdt.core.codeComplete.discouragedReferenceCheck=disabled 19 | org.eclipse.jdt.core.codeComplete.fieldPrefixes= 20 | org.eclipse.jdt.core.codeComplete.fieldSuffixes= 21 | org.eclipse.jdt.core.codeComplete.forbiddenReferenceCheck=enabled 22 | org.eclipse.jdt.core.codeComplete.forceImplicitQualification=disabled 23 | org.eclipse.jdt.core.codeComplete.localPrefixes= 24 | org.eclipse.jdt.core.codeComplete.localSuffixes= 25 | org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= 26 | org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= 27 | org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= 28 | org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= 29 | org.eclipse.jdt.core.codeComplete.subwordMatch=disabled 30 | org.eclipse.jdt.core.codeComplete.suggestStaticImports=enabled 31 | org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled 32 | org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled 33 | org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore 34 | org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull 35 | org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= 36 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault 37 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= 38 | org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable 39 | org.eclipse.jdt.core.compiler.annotation.nullable.secondary= 40 | org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled 41 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 42 | org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate 43 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 44 | org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled 45 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 46 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 47 | org.eclipse.jdt.core.compiler.compliance=1.5 48 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 49 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 50 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 51 | org.eclipse.jdt.core.compiler.doc.comment.support=enabled 52 | org.eclipse.jdt.core.compiler.emulateJavacBug8031744=enabled 53 | org.eclipse.jdt.core.compiler.generateClassFiles=enabled 54 | org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 55 | org.eclipse.jdt.core.compiler.problem.APILeak=warning 56 | org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info 57 | org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning 58 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 59 | org.eclipse.jdt.core.compiler.problem.autoboxing=ignore 60 | org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning 61 | org.eclipse.jdt.core.compiler.problem.deadCode=warning 62 | org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement=disabled 63 | org.eclipse.jdt.core.compiler.problem.deprecation=warning 64 | org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled 65 | org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled 66 | org.eclipse.jdt.core.compiler.problem.discouragedReference=warning 67 | org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore 68 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 69 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 70 | org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore 71 | org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore 72 | org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled 73 | org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore 74 | org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning 75 | org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning 76 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 77 | org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning 78 | org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled 79 | org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning 80 | org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning 81 | org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore 82 | org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore 83 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled 84 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled 85 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled 86 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public 87 | org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore 88 | org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning 89 | org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore 90 | org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore 91 | org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled 92 | org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore 93 | org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore 94 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled 95 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public 96 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag 97 | org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore 98 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled 99 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled 100 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public 101 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore 102 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled 103 | org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore 104 | org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore 105 | org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning 106 | org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning 107 | org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore 108 | org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning 109 | org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning 110 | org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning 111 | org.eclipse.jdt.core.compiler.problem.nullReference=warning 112 | org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning 113 | org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning 114 | org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation=ignore 115 | org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning 116 | org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore 117 | org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning 118 | org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore 119 | org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning 120 | org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore 121 | org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning 122 | org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning 123 | org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore 124 | org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore 125 | org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning 126 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore 127 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore 128 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 129 | org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled 130 | org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning 131 | org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled 132 | org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled 133 | org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info 134 | org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled 135 | org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore 136 | org.eclipse.jdt.core.compiler.problem.tasks=warning 137 | org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning 138 | org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning 139 | org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled 140 | org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning 141 | org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning 142 | org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore 143 | org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore 144 | org.eclipse.jdt.core.compiler.problem.uninternedIdentityComparison=disabled 145 | org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning 146 | org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled 147 | org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info 148 | org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore 149 | org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore 150 | org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore 151 | org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning 152 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore 153 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled 154 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 155 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled 156 | org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore 157 | org.eclipse.jdt.core.compiler.problem.unusedImport=warning 158 | org.eclipse.jdt.core.compiler.problem.unusedLabel=warning 159 | org.eclipse.jdt.core.compiler.problem.unusedLocal=warning 160 | org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore 161 | org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore 162 | org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled 163 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled 164 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled 165 | org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning 166 | org.eclipse.jdt.core.compiler.problem.unusedTypeArgumentsForMethodInvocation=warning 167 | org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore 168 | org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning 169 | org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning 170 | org.eclipse.jdt.core.compiler.processAnnotations=disabled 171 | org.eclipse.jdt.core.compiler.release=disabled 172 | org.eclipse.jdt.core.compiler.source=1.5 173 | org.eclipse.jdt.core.compiler.storeAnnotations=disabled 174 | org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled 175 | org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL 176 | org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX 177 | org.eclipse.jdt.core.computeJavaBuildOrder=ignore 178 | org.eclipse.jdt.core.encoding=utf8 179 | org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false 180 | org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 181 | org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=true 182 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=false 183 | org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false 184 | org.eclipse.jdt.core.formatter.align_with_spaces=false 185 | org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 186 | org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49 187 | org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49 188 | org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49 189 | org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49 190 | org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49 191 | org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0 192 | org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49 193 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 194 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 195 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 196 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 197 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 198 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 199 | org.eclipse.jdt.core.formatter.alignment_for_assertion_message=16 200 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0 201 | org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 202 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 203 | org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 204 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 205 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 206 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 207 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 208 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 209 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=16 210 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=16 211 | org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 212 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 213 | org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 214 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 215 | org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 216 | org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 217 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 218 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 219 | org.eclipse.jdt.core.formatter.alignment_for_record_components=16 220 | org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 221 | org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 222 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 223 | org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 224 | org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 225 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 226 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 227 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 228 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 229 | org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=20 230 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 231 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 232 | org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 233 | org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 234 | org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 235 | org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 236 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 237 | org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 238 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1 239 | org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 240 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0 241 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 242 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 243 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 244 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1 245 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 246 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0 247 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 248 | org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 249 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 250 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line 251 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line 252 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line 253 | org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line 254 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line 255 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line 256 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line 257 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line 258 | org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line 259 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line 260 | org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line 261 | org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line 262 | org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line 263 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line 264 | org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true 265 | org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false 266 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false 267 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false 268 | org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true 269 | org.eclipse.jdt.core.formatter.comment.format_block_comments=true 270 | org.eclipse.jdt.core.formatter.comment.format_header=false 271 | org.eclipse.jdt.core.formatter.comment.format_html=true 272 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true 273 | org.eclipse.jdt.core.formatter.comment.format_line_comments=true 274 | org.eclipse.jdt.core.formatter.comment.format_source_code=true 275 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false 276 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=false 277 | org.eclipse.jdt.core.formatter.comment.indent_tag_description=false 278 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert 279 | org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert 280 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert 281 | org.eclipse.jdt.core.formatter.comment.line_length=80 282 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true 283 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true 284 | org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false 285 | org.eclipse.jdt.core.formatter.compact_else_if=true 286 | org.eclipse.jdt.core.formatter.continuation_indentation=2 287 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 288 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off 289 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on 290 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false 291 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false 292 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true 293 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true 294 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true 295 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true 296 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true 297 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true 298 | org.eclipse.jdt.core.formatter.indent_empty_lines=false 299 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true 300 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true 301 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true 302 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true 303 | org.eclipse.jdt.core.formatter.indentation.size=4 304 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert 305 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert 306 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert 307 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert 308 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert 309 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert 310 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert 311 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert 312 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert 313 | org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert 314 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert 315 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert 316 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert 317 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert 318 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert 319 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert 320 | org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert 321 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert 322 | org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert 323 | org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert 324 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert 325 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert 326 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert 327 | org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert 328 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert 329 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert 330 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert 331 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert 332 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert 333 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert 334 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert 335 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert 336 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert 337 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert 338 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert 339 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert 340 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert 341 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert 342 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert 343 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert 344 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert 345 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert 346 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert 347 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert 348 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert 349 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert 350 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert 351 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert 352 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert 353 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types=insert 354 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert 355 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert 356 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert 357 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert 358 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert 359 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert 360 | org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert 361 | org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert 362 | org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert 363 | org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert 364 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert 365 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert 366 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert 367 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert 368 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert 369 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert 370 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert 371 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert 372 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert 373 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert 374 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert 375 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert 376 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert 377 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert 378 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert 379 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert 380 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert 381 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert 382 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert 383 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert 384 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert 385 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert 386 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert 387 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert 388 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert 389 | org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert 390 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert 391 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert 392 | org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert 393 | org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert 394 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert 395 | org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert 396 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert 397 | org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert 398 | org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert 399 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert 400 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert 401 | org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert 402 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert 403 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert 404 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert 405 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert 406 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert 407 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert 408 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert 409 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert 410 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert 411 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert 412 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert 413 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert 414 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert 415 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert 416 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert 417 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert 418 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert 419 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert 420 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert 421 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert 422 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert 423 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert 424 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert 425 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert 426 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert 427 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert 428 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert 429 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert 430 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert 431 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert 432 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert 433 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert 434 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert 435 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert 436 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert 437 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert 438 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert 439 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert 440 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert 441 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert 442 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert 443 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert 444 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert 445 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert 446 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert 447 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert 448 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert 449 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert 450 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert 451 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert 452 | org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert 453 | org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert 454 | org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert 455 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert 456 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert 457 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert 458 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert 459 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert 460 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert 461 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert 462 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert 463 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert 464 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert 465 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert 466 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert 467 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert 468 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert 469 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert 470 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert 471 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert 472 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert 473 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert 474 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert 475 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert 476 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert 477 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert 478 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert 479 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert 480 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert 481 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert 482 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert 483 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert 484 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert 485 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert 486 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert 487 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert 488 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert 489 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert 490 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert 491 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert 492 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert 493 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert 494 | org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert 495 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert 496 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert 497 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert 498 | org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert 499 | org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert 500 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert 501 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert 502 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert 503 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert 504 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert 505 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert 506 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert 507 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert 508 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert 509 | org.eclipse.jdt.core.formatter.join_lines_in_comments=false 510 | org.eclipse.jdt.core.formatter.join_wrapped_lines=false 511 | org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never 512 | org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never 513 | org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never 514 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false 515 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false 516 | org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never 517 | org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never 518 | org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never 519 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false 520 | org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never 521 | org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never 522 | org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never 523 | org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never 524 | org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never 525 | org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false 526 | org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false 527 | org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false 528 | org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false 529 | org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never 530 | org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never 531 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false 532 | org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never 533 | org.eclipse.jdt.core.formatter.lineSplit=120 534 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false 535 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false 536 | org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 537 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 538 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 539 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 540 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 541 | org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 542 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 543 | org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines 544 | org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines 545 | org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines 546 | org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines 547 | org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines 548 | org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines 549 | org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines 550 | org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines 551 | org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines 552 | org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines 553 | org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines 554 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true 555 | org.eclipse.jdt.core.formatter.tabulation.char=space 556 | org.eclipse.jdt.core.formatter.tabulation.size=4 557 | org.eclipse.jdt.core.formatter.text_block_indentation=0 558 | org.eclipse.jdt.core.formatter.use_on_off_tags=true 559 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false 560 | org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true 561 | org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true 562 | org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false 563 | org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true 564 | org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true 565 | org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true 566 | org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true 567 | org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true 568 | org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true 569 | org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true 570 | org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true 571 | org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false 572 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true 573 | org.eclipse.jdt.core.incompatibleJDKLevel=ignore 574 | org.eclipse.jdt.core.incompleteClasspath=error 575 | org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter 576 | org.eclipse.jdt.core.timeoutForParameterNameFromAttachedJavadoc=50 577 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | letcode 6 | letcodeCucumber 7 | 0.0.1-SNAPSHOT 8 | 9 | 10 | 11 | org.seleniumhq.selenium 12 | selenium-java 13 | 3.141.59 14 | 15 | 16 | io.cucumber 17 | cucumber-java 18 | 4.2.2 19 | 20 | 21 | 22 | io.cucumber 23 | cucumber-testng 24 | 4.2.2 25 | 26 | 27 | 28 | com.aventstack 29 | extentreports-cucumber4-adapter 30 | 1.2.1 31 | 32 | 33 | com.aventstack 34 | extentreports 35 | 5.0.1 36 | 37 | 38 | 39 | 40 | io.cucumber 41 | cucumber-picocontainer 42 | 4.2.2 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Cucumber (Selenium + Java) Tutorial in English & Tamil 2 | 3 | # [Youtube tutorial](https://letcode.in/cucumber) 4 | 5 | ## What is Cucumber? 6 | - Cucumber is a software tool that supports behavior-driven development 7 | - Cucumber use Gherkin language as a parser 8 | - It supports various language liks Java, JavaScript, Ruby & Python 9 | - Cucumber is free to use 10 | 11 | ## What is BDD? 12 | - BDD includes test case development on the basis of the behavior of software functionalities 13 | - BDD is written in simple English language statements, not in a typical programming language 14 | - BDD improves communication between technical and non-technical teams and stakeholders 15 | 16 | ## What is Gherkin? 17 | - Gherkin is a language that developers use to define tests in Cucumber. Since this language uses plain English, it’s meant to describe use cases for a software system in a way that can be read and understood by almost anyone 18 | 19 | ### Gherkin Syntax 20 | - Feature -> The feature file starts with the keyword Feature. Under feature, you can mention the feature name which is to be tested 21 | - Scenario -> Each scenario starts with a keyword Scenario 22 | There can be one or more scenarios in a feature file 23 | - Given -> It is used to define the pre-condition in our test 24 | - When -> It is used to define an action 25 | - And -> It is used to connect two statements and provides the logical AND condition between any two statements 26 | - Then -> It is used to define the final outcome or for validation 27 | - But -> It defines the negative assertion 28 | 29 | ## What are Hooks? 30 | - Hooks are blocks of code that can run at various points in the Cucumber execution cycle. 31 | - They are typically used for setup and teardown of the environment before and after each scenario. 32 | 33 | ### Types of hooks 34 | - Scenario hooks 35 | - @Before 36 | - @After 37 | - Step hook 38 | - @BeforeStep 39 | - @AfterStep 40 | 41 | ### Tags 42 | - Tags are a great way to organise your features and scenarios 43 | - Tags can be used in the following places: 44 | - Feature 45 | - Scenario 46 | - Scenario Outline 47 | - Examples 48 | - Tags can be used in conditional format using "And", "or" & "not" 49 | - It is similar to groups in TestNG 50 | 51 | ## Installation 52 | Selenium Dependency 53 | ``` 54 | 55 | org.seleniumhq.selenium 56 | selenium-java 57 | 3.141.59 58 | 59 | ``` 60 | 61 | Cucumber Dependency 62 | ``` 63 | 64 | 65 | io.cucumber 66 | cucumber-java 67 | 4.2.2 68 | 69 | 70 | 71 | 72 | io.cucumber 73 | cucumber-testng 74 | 4.2.2 75 | 76 | ``` 77 | 78 | ## Report 79 | Extent Report 80 | ``` 81 | 82 | com.aventstack 83 | extentreports-cucumber4-adapter 84 | 1.2.1 85 | 86 | 87 | com.aventstack 88 | extentreports 89 | 5.0.1 90 | 91 | ``` 92 | 93 | # [Youtube tutorial](https://letcode.in/cucumber) -------------------------------------------------------------------------------- /spark-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | DARK 8 | 9 | 10 | 11 | UTF-8 12 | 13 | 14 | 15 | 16 | HTTPS 17 | 18 | 19 | true 20 | 21 | 22 | true 23 | 24 | 25 | 26 | thumbnails 27 | 28 | 29 | BookCart Test Report 30 | 31 | 32 | BDD Tests 33 | 34 | 35 | MMM dd, yyyy HH:mm:ss 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 48 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/java/base/DriverInstance.java: -------------------------------------------------------------------------------- 1 | package base; 2 | 3 | import org.openqa.selenium.remote.RemoteWebDriver; 4 | import org.openqa.selenium.support.ui.WebDriverWait; 5 | 6 | public class DriverInstance { 7 | 8 | protected static RemoteWebDriver driver; 9 | protected static WebDriverWait wait; 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/base/PageContext.java: -------------------------------------------------------------------------------- 1 | package base; 2 | 3 | import org.openqa.selenium.remote.RemoteWebDriver; 4 | import org.openqa.selenium.support.ui.WebDriverWait; 5 | 6 | public class PageContext { 7 | 8 | 9 | public RemoteWebDriver getDriver() { 10 | return driver; 11 | } 12 | public void setDriver(RemoteWebDriver driver) { 13 | this.driver = driver; 14 | } 15 | public WebDriverWait getWait() { 16 | return wait; 17 | } 18 | public void setWait(WebDriverWait wait) { 19 | this.wait = wait; 20 | } 21 | private RemoteWebDriver driver; 22 | private WebDriverWait wait; 23 | 24 | 25 | 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/pages/HeaderPage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebElement; 5 | import org.openqa.selenium.support.ui.ExpectedConditions; 6 | import org.testng.Assert; 7 | 8 | import base.PageContext; 9 | import cucumber.api.java.en.And; 10 | import cucumber.api.java.en.Given; 11 | import cucumber.api.java.en.Then; 12 | 13 | public class HeaderPage { 14 | 15 | PageContext context; 16 | public HeaderPage( PageContext context) { 17 | this.context = context; 18 | } 19 | 20 | @And("User click on the login link") 21 | public void userClicksOnTheLoginLink() { 22 | context.getDriver().findElement(By.xpath("(//span[text()='Login'])[1]/..")).click(); 23 | } 24 | 25 | @Given("user search for a {string}") 26 | public void userSearchForA(String bookname) { 27 | WebElement search = context.getDriver().findElement(By.cssSelector("input[type='search']")); 28 | context.getWait().until(ExpectedConditions.visibilityOf(search)); 29 | search.sendKeys(bookname); 30 | WebElement searchOption = 31 | context.getDriver().findElement(By.cssSelector("span.mat-option-text")); 32 | WebElement options = 33 | context.getWait().until(ExpectedConditions.visibilityOf(searchOption)); 34 | options.click(); 35 | } 36 | 37 | @Then("the cart badge should get updated") 38 | public void theCartBadgeShouldGetUpdated() { 39 | WebElement snackBar = context.getDriver().findElement(By.tagName("snack-bar-container")); 40 | context.getWait().until(ExpectedConditions.visibilityOf(snackBar)); 41 | context.getWait().until(ExpectedConditions.invisibilityOf(snackBar)); 42 | String text = 43 | context.getDriver().findElement(By.cssSelector("#mat-badge-content-0")).getText(); 44 | System.out.println("No.of books in cart: "+text); 45 | Assert.assertEquals(Integer.parseInt(text) > 0, true); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/pages/HomePage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebElement; 5 | import org.openqa.selenium.support.ui.ExpectedConditions; 6 | 7 | import base.PageContext; 8 | import cucumber.api.java.en.When; 9 | 10 | public class HomePage { 11 | 12 | PageContext context; 13 | public HomePage(PageContext context) { 14 | this.context = context; 15 | } 16 | 17 | 18 | @When("user add the book to the cart") 19 | public void userAddTheBookToTheCart() { 20 | WebElement addToCart = 21 | context.getDriver().findElement(By.xpath("(//button[@color='primary']//span/..)[1]")); 22 | context.getWait().until(ExpectedConditions.visibilityOf(addToCart)).click(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/pages/LoginPage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import static org.testng.Assert.assertEquals; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.ui.ExpectedConditions; 8 | import org.testng.Assert; 9 | 10 | import base.PageContext; 11 | import cucumber.api.java.en.Given; 12 | import cucumber.api.java.en.Then; 13 | import cucumber.api.java.en.When; 14 | 15 | public class LoginPage { 16 | 17 | PageContext context; 18 | public LoginPage(PageContext context) { 19 | this.context = context; 20 | } 21 | 22 | @Given("User enter the username as {string}") 23 | public LoginPage userEnterTheUsernameAs(String username) { 24 | context.getDriver().findElement(By.cssSelector("input[formcontrolname='username']")). 25 | sendKeys(username); 26 | return this; 27 | } 28 | 29 | @Given("User enter the password as {string}") 30 | public LoginPage userEnterThePasswordAs(String password) { 31 | context.getDriver().findElement(By.cssSelector("input[formcontrolname='password']")). 32 | sendKeys(password); 33 | return this; 34 | } 35 | 36 | @When("User click on the login button") 37 | public HomePage userClickOnTheLoginButton() { 38 | context.getDriver().findElement(By.xpath("(//span[text()='Login'])[last()]/..")) 39 | .click(); 40 | return new HomePage(context); 41 | } 42 | 43 | @Then("Login should be success") 44 | public HomePage loginShouldBeSuccess() { 45 | WebElement userEle = context.getDriver().findElement(By. 46 | xpath("//button[contains(@class,'mat-focus-indicator mat-menu-trigger')]//span[1]" 47 | )); 48 | context.getWait().until(ExpectedConditions.visibilityOf(userEle)); 49 | assertEquals(userEle.isDisplayed(), true); 50 | return new HomePage(context); 51 | } 52 | 53 | @When("Login should fail") 54 | public LoginPage loginShouldFail() { 55 | String text = 56 | context.getDriver().findElement(By.cssSelector("mat-error[role='alert']")).getText(); 57 | Assert.assertEquals(text.trim(), "Username or Password is incorrect."); 58 | return this; 59 | } 60 | 61 | @Given("user login into the application with {string} and {string}") 62 | public void userLoginIntoTheApplicationWithAnd(String uname, String pass) { 63 | new HeaderPage(context) 64 | .userClicksOnTheLoginLink(); 65 | this.userEnterTheUsernameAs(uname) 66 | .userEnterThePasswordAs(pass) 67 | .userClickOnTheLoginButton(); 68 | this.loginShouldBeSuccess(); 69 | /* 70 | * this.userEnterTheUsernameAs(uname); 71 | * this.userEnterThePasswordAs(pass); 72 | * this.userClickOnTheLoginButton(); 73 | */ 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/test/java/features/addToCart.feature: -------------------------------------------------------------------------------- 1 | #@E2E 2 | Feature: Prodcuts test 3 | 4 | @prod @cleanCart 5 | Scenario Outline: Add to cart 6 | And user login into the application with "" and "" 7 | And user search for a "" 8 | When user add the book to the cart 9 | Then the cart badge should get updated 10 | 11 | @prod 12 | Examples: 13 | | username | password | book | 14 | | ortoni | pass1234 | Roomies | 15 | | ortonikc | pass1234 | The Simple Wild | 16 | 17 | @test 18 | Examples: 19 | | username | password | book | 20 | | ortonikc | pass1234 | The Simple Wild | 21 | -------------------------------------------------------------------------------- /src/test/java/features/login.feature: -------------------------------------------------------------------------------- 1 | Feature: User Authentication tests 2 | 3 | Background: 4 | And User click on the login link 5 | 6 | @smoke @reg 7 | Scenario: Login should be success 8 | And User enter the username as "ortoni" 9 | And User enter the password as "Pass1234" 10 | When User click on the login button 11 | Then Login should be success 12 | 13 | @smoke @reg 14 | Scenario: Login should not be success 15 | Given User enter the username as "koushik" 16 | Given User enter the password as "Passkoushik" 17 | When User click on the login button 18 | But Login should fail 19 | -------------------------------------------------------------------------------- /src/test/java/hooks/MyHooks.java: -------------------------------------------------------------------------------- 1 | package hooks; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.OutputType; 7 | import org.openqa.selenium.WebDriver.Options; 8 | import org.openqa.selenium.chrome.ChromeDriver; 9 | import org.openqa.selenium.remote.RemoteWebDriver; 10 | import org.openqa.selenium.support.ui.WebDriverWait; 11 | import org.testng.Assert; 12 | 13 | import base.PageContext; 14 | import cucumber.api.Scenario; 15 | import cucumber.api.java.After; 16 | import cucumber.api.java.Before; 17 | 18 | public class MyHooks { 19 | 20 | 21 | private PageContext context; 22 | 23 | public MyHooks(PageContext context) { 24 | this.context = context; 25 | } 26 | 27 | @After("@cleanCart") 28 | public void cleanUp() { 29 | context.getDriver().findElement(By.xpath("(//button[contains(@class,'mat-focus-indicator mat-icon-button')]/following-sibling::button)[1]")).click(); 30 | context.getDriver().findElement(By.xpath("//span[text()='Clear cart']/..")).click(); 31 | String text = context.getDriver().findElement(By.tagName("mat-card-title")).getText(); 32 | Assert.assertEquals(text, "Shopping cart is empty"); 33 | } 34 | 35 | @Before(order = 1) 36 | public void beforeScenario(Scenario scenario) { 37 | System.out.println("Im in beforeScenario"); 38 | RemoteWebDriver driver = new ChromeDriver(); 39 | WebDriverWait wait= new WebDriverWait(driver, 10); 40 | context.setDriver(driver); 41 | context.setWait(wait); 42 | context.getDriver().get("https://bookcart.azurewebsites.net/"); 43 | Options manage =context.getDriver().manage(); 44 | manage.timeouts().implicitlyWait(10, TimeUnit.SECONDS); 45 | manage.window().maximize(); 46 | 47 | } 48 | 49 | @After(order = 1) 50 | public void afterScenario(Scenario scenario) { 51 | boolean failed = scenario.isFailed(); 52 | System.out.println("is Failed? "+failed); 53 | if(!failed) { 54 | byte[] screenshotAs = context.getDriver().getScreenshotAs(OutputType.BYTES); 55 | scenario.embed(screenshotAs, "image/png"); 56 | } 57 | context.getDriver().quit(); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/test/java/steps/AddToCartSteps.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package steps; 3 | * 4 | * import org.openqa.selenium.By; 5 | * import org.openqa.selenium.WebElement; 6 | * import org.openqa.selenium.support.ui.ExpectedConditions; 7 | * import org.testng.Assert; 8 | * 9 | * import base.DriverInstance; 10 | * import cucumber.api.java.en.Given; 11 | * import cucumber.api.java.en.Then; 12 | * import cucumber.api.java.en.When; 13 | * 14 | * public class AddToCartSteps extends DriverInstance{ 15 | * 16 | * @Given("user login into the application with {string} and {string}") 17 | * public void userLoginIntoTheApplicationWithAnd(String uname, String pass) { 18 | * driver.findElement(By.xpath("(//span[text()='Login'])[1]/..")).click(); 19 | * driver.findElement(By.cssSelector("input[formcontrolname='username']")) 20 | * .sendKeys(uname); 21 | * driver.findElement(By.cssSelector("input[formcontrolname='password']")) 22 | * .sendKeys(pass); 23 | * driver.findElement(By.cssSelector("button[color='primary']")).click(); 24 | * WebElement userEle = driver.findElement(By. 25 | * xpath("//button[contains(@class,'mat-focus-indicator mat-menu-trigger')]//span[1]" 26 | * )); 27 | * wait.until(ExpectedConditions.visibilityOf(userEle)); 28 | * } 29 | * 30 | * @Given("user search for a {string}") 31 | * public void userSearchForA(String bookname) { 32 | * driver.findElement(By.cssSelector("input[type='search']")).sendKeys(bookname) 33 | * ; 34 | * WebElement searchOption = 35 | * driver.findElement(By.cssSelector("span.mat-option-text")); 36 | * WebElement options = 37 | * wait.until(ExpectedConditions.visibilityOf(searchOption)); 38 | * options.click(); 39 | * } 40 | * 41 | * @When("user add the book to the cart") 42 | * public void userAddTheBookToTheCart() { 43 | * WebElement addToCart = 44 | * driver.findElement(By.xpath("(//button[@color='primary']//span/..)[1]")); 45 | * wait.until(ExpectedConditions.visibilityOf(addToCart)).click(); 46 | * } 47 | * 48 | * @Then("the cart badge should get updated") 49 | * public void theCartBadgeShouldGetUpdated() { 50 | * WebElement snackBar = driver.findElement(By.tagName("snack-bar-container")); 51 | * wait.until(ExpectedConditions.visibilityOf(snackBar)); 52 | * wait.until(ExpectedConditions.invisibilityOf(snackBar)); 53 | * String text = 54 | * driver.findElement(By.cssSelector("#mat-badge-content-0")).getText(); 55 | * System.out.println("No.of books in cart: "+text); 56 | * Assert.assertEquals(Integer.parseInt(text) > 0, true); 57 | * } 58 | * 59 | * } 60 | */ -------------------------------------------------------------------------------- /src/test/java/steps/LoginPOMSD.java: -------------------------------------------------------------------------------- 1 | package steps; 2 | 3 | import cucumber.api.java.en.And; 4 | import pages.HeaderPage; 5 | 6 | public class LoginPOMSD { 7 | 8 | /* 9 | @And("User click on the login link") 10 | public void userClicksOnTheLoginButton() { 11 | HeaderPage page = new HeaderPage(); 12 | page.userClicksOnTheLoginLink(); 13 | } 14 | */ 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/test/java/steps/LoginSteps.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package steps; 3 | * 4 | * import org.openqa.selenium.By; 5 | * import org.openqa.selenium.WebElement; 6 | * import org.openqa.selenium.support.ui.ExpectedConditions; 7 | * import org.testng.Assert; 8 | * 9 | * import base.DriverInstance; 10 | * import cucumber.api.java.en.And; 11 | * import cucumber.api.java.en.Given; 12 | * import cucumber.api.java.en.Then; 13 | * import cucumber.api.java.en.When; 14 | * 15 | * public class LoginSteps extends DriverInstance{ 16 | * 17 | * @And("User click on the login link") 18 | * public void userClicksOnTheLoginButton() { 19 | * driver.findElement(By.xpath("(//span[text()='Login'])[1]/..")).click(); 20 | * } 21 | * 22 | * @And("User enter the username as ortoni") 23 | * public void userEnterTheUsernameAsOrtoni() { 24 | * driver.findElement(By.cssSelector("input[formcontrolname='username']")) 25 | * .sendKeys("ortoni"); 26 | * } 27 | * 28 | * @When("User click on the login button") 29 | * public void userClickOnTheLoginButton() { 30 | * driver.findElement(By.xpath("(//span[text()='Login'])[last()]/..")) 31 | * .click(); 32 | * } 33 | * 34 | * @Then("Login should be success") 35 | * public void loginShouldBeSuccess() { 36 | * WebElement userEle = driver.findElement(By. 37 | * xpath("//button[contains(@class,'mat-focus-indicator mat-menu-trigger')]//span[1]" 38 | * )); 39 | * wait.until(ExpectedConditions.visibilityOf(userEle)); 40 | * } 41 | * 42 | * 43 | * @When("Login should fail") 44 | * public void loginShouldFail() { 45 | * String text = 46 | * driver.findElement(By.cssSelector("mat-error[role='alert']")).getText(); 47 | * Assert.assertEquals(text.trim(), "Username or Password is incorrect."); 48 | * } 49 | * 50 | * @Given("User enter the username as {string}") 51 | * public void userEnterTheUsernameAs(String username) { 52 | * driver.findElement(By.cssSelector("input[formcontrolname='username']")). 53 | * sendKeys(username); 54 | * } 55 | * 56 | * @Given("User enter the password as {string}") 57 | * public void userEnterThePasswordAs(String password) { 58 | * driver.findElement(By.cssSelector("input[formcontrolname='password']")). 59 | * sendKeys(password); 60 | * } 61 | * 62 | * 63 | * } 64 | * 65 | */ -------------------------------------------------------------------------------- /src/test/java/testRunner/LoginTestRunner.java: -------------------------------------------------------------------------------- 1 | package testRunner; 2 | 3 | import cucumber.api.CucumberOptions; 4 | import cucumber.api.SnippetType; 5 | import cucumber.api.testng.AbstractTestNGCucumberTests; 6 | 7 | @CucumberOptions( 8 | features = {"src/test/java/features/login.feature"}, 9 | dryRun = !true, 10 | snippets = SnippetType.CAMELCASE, 11 | monochrome = true, 12 | glue = { "steps", "hooks", "pages"}, 13 | plugin = "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" 14 | 15 | // plugin = {"pretty", "html:CucumberReports", 16 | // "json:reports/result.json", 17 | // "junit:reports/result.xml"} 18 | // tags = {"@smoke and @reg"} 19 | ) 20 | 21 | public class LoginTestRunner extends AbstractTestNGCucumberTests { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/testRunner/ProductsTestRunner.java: -------------------------------------------------------------------------------- 1 | package testRunner; 2 | 3 | import cucumber.api.CucumberOptions; 4 | import cucumber.api.SnippetType; 5 | import cucumber.api.testng.AbstractTestNGCucumberTests; 6 | 7 | @CucumberOptions( 8 | features = {"src/test/java/features/addToCart.feature"}, 9 | dryRun = !true, 10 | snippets = SnippetType.CAMELCASE, 11 | monochrome = true, 12 | glue = { "steps", "hooks", "pages"}, 13 | plugin = "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" 14 | 15 | // plugin = {"pretty", "html:CucumberReports", 16 | // "json:reports/result.json", 17 | // "junit:reports/result.xml"} 18 | // tags = {"@smoke and @reg"} 19 | ) 20 | 21 | public class ProductsTestRunner extends AbstractTestNGCucumberTests { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/test/resources/extent.properties: -------------------------------------------------------------------------------- 1 | extent.reporter.spark.start=true 2 | extent.reporter.spark.config=spark-config.xml 3 | extent.reporter.spark.out=test-output/spark 4 | screesnshot.dir=test-output/ 5 | screenshot.rel.path=../ -------------------------------------------------------------------------------- /testng.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------