How to use OpenApiCoveredOperations class of org.testingisdocumenting.webtau.openapi package

Best Webtau code snippet using org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations

Source:OpenApiCoverage.java Github

copy

Full Screen

...22import java.util.stream.Collectors;23import java.util.stream.Stream;24public class OpenApiCoverage {25 private final OpenApiSpec spec;26 private final OpenApiCoveredOperations coveredOperations = new OpenApiCoveredOperations();27 public OpenApiCoverage(OpenApiSpec spec) {28 this.spec = spec;29 }30 public void recordOperation(HttpValidationResult validationResult) {31 if (!spec.isSpecDefined()) {32 return;33 }34 Optional<OpenApiOperation> apiOperation = spec.findApiOperation(35 validationResult.getRequestMethod(),36 validationResult.getFullUrl());37 apiOperation.ifPresent(openApiOperation -> coveredOperations.add(openApiOperation, validationResult.getResponseStatusCode(), validationResult.getId()));38 }39 List<Map<String, ?>> httpCallIdsByOperationAsMap() {40 return coveredOperations.httpCallIdsByOperationAsMap();41 }42 List<Map<String, ?>> httpCallsByOperationAsMap() {43 return coveredOperations.httpCallsByOperationAsMap();44 }45 Stream<OpenApiOperation> coveredOperations() {46 return coveredOperations.coveredOperations();47 }48 Stream<OpenApiOperation> nonCoveredOperations() {49 return spec.availableOperationsStream().filter(o -> !coveredOperations.contains(o));50 }51 private Map<OpenApiOperation, Map<String, Integer>> getInvocationCounts() {52 Map<OpenApiOperation, Map<String, Integer>> operationToResponseToInvocationCount = spec.availableOperationsStream()53 .collect(Collectors.toMap(54 Function.identity(),55 op -> spec.getDeclaredResponses(op).stream()56 .collect(Collectors.toMap(57 Function.identity(),58 resp -> 0))59 )60 );61 coveredOperations.getActualCalls().forEach(entry -> {62 OpenApiOperation op = entry.getKey();63 Set<Integer> actualResponses = entry.getValue().stream().map(OpenApiCoveredOperations.Call::getStatusCode).collect(Collectors.toSet());64 Map<String, Integer> declaredResponses = operationToResponseToInvocationCount.get(op);65 for (Integer actualResponse : actualResponses) {66 String matchingKey = determineMatchingResponse(declaredResponses, actualResponse);67 if (matchingKey != null) {68 int currentCount = declaredResponses.get(matchingKey);69 declaredResponses.put(matchingKey, currentCount + 1);70 }71 }72 });73 return operationToResponseToInvocationCount;74 }75 /*76 Responses in the swagger spec can be any of the following:77 - an integer representing the status code...

Full Screen

Full Screen

Source:OpenApiCoveredOperations.java Github

copy

Full Screen

...17import java.util.*;18import java.util.stream.Collectors;19import java.util.stream.Stream;20import static java.util.stream.Collectors.toList;21class OpenApiCoveredOperations {22 private Map<OpenApiOperation, Set<Call>> actualCallsIdsByOperation;23 OpenApiCoveredOperations() {24 actualCallsIdsByOperation = new LinkedHashMap<>();25 }26 void add(OpenApiOperation openApiOperation, int statusCode, String id) {27 Set<Call> calls =28 actualCallsIdsByOperation.computeIfAbsent(openApiOperation, k -> new LinkedHashSet<>());29 calls.add(new Call(statusCode, id));30 }31 Stream<OpenApiOperation> coveredOperations() {32 return actualCallsIdsByOperation.keySet().stream();33 }34 boolean contains(OpenApiOperation openApiOperation) {35 return actualCallsIdsByOperation.containsKey(openApiOperation);36 }37 public Stream<Map.Entry<OpenApiOperation, Set<Call>>> getActualCalls() {...

Full Screen

Full Screen

Source:OpenApiReportDataProvider.java Github

copy

Full Screen

1/*2 * Copyright 2021 webtau maintainers3 * Copyright 2019 TWO SIGMA OPEN SOURCE, LLC4 *5 * Licensed under the Apache License, Version 2.0 (the "License");6 * you may not use this file except in compliance with the License.7 * You may obtain a copy of the License at8 *9 * http://www.apache.org/licenses/LICENSE-2.010 *11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17package org.testingisdocumenting.webtau.openapi;18import org.testingisdocumenting.webtau.reporter.WebTauReportCustomData;19import org.testingisdocumenting.webtau.report.ReportDataProvider;20import org.testingisdocumenting.webtau.reporter.WebTauReportLog;21import org.testingisdocumenting.webtau.reporter.WebTauTestList;22import java.util.*;23import java.util.stream.Collectors;24import java.util.stream.Stream;25public class OpenApiReportDataProvider implements ReportDataProvider {26 @Override27 public Stream<WebTauReportCustomData> provide(WebTauTestList tests, WebTauReportLog log) {28 if (OpenApi.isCoverageUninitialized()) {29 return Stream.empty();30 }31 List<? extends Map<String, ?>> nonCoveredOperations = OpenApi.getCoverage().nonCoveredOperations()32 .map(OpenApiOperation::toMap)33 .collect(Collectors.toList());34 List<? extends Map<String, ?>> coveredOperations = OpenApi.getCoverage().coveredOperations()35 .map(OpenApiOperation::toMap)36 .collect(Collectors.toList());37 List<? extends Map<String, ?>> coveredResponses = convertResponses(OpenApi.getCoverage().coveredResponses());38 List<? extends Map<String, ?>> nonCoveredResponses = convertResponses(OpenApi.getCoverage().nonCoveredResponses());39 return Stream.of(40 new WebTauReportCustomData("openApiSkippedOperations", nonCoveredOperations),41 new WebTauReportCustomData("openApiCoveredOperations", coveredOperations),42 new WebTauReportCustomData("openApiHttpCallIdsPerOperation",43 OpenApi.getCoverage().httpCallIdsByOperationAsMap()),44 new WebTauReportCustomData("openApiHttpCallsPerOperation",45 OpenApi.getCoverage().httpCallsByOperationAsMap()),46 new WebTauReportCustomData("openApiCoveredResponses", coveredResponses),47 new WebTauReportCustomData("openApiSkippedResponses", nonCoveredResponses));48 }49 private static List<? extends Map<String, ?>> convertResponses(Map<OpenApiOperation, Set<String>> responses) {50 return responses.entrySet()51 .stream()52 .flatMap(entry ->53 entry.getValue().stream().map(statusCode -> {54 Map<String, Object> responseMap = new HashMap<>(entry.getKey().toMap());55 responseMap.put("statusCode", statusCode);56 return responseMap;57 }))58 .collect(Collectors.toList());59 }60}...

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1import org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations;2import org.testingisdocumenting.webtau.openapi.OpenApiCoverage;3import org.testingisdocumenting.webtau.openapi.OpenApiCoverageOptions;4import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportOptions;5import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportType;6import org.testingisdocumenting.webtau.openapi.OpenApiCoverageOptions;7import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportOptions;8import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportType;9import org.testingisdocumenting.webtau.openapi.OpenApiExpectations;

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1import org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations;2import org.testingisdocumenting.webtau.openapi.OpenApiCoverage;3import org.testingisdocumenting.webtau.openapi.OpenApiCoverageOptions;4import org.testingisdocumenting.webtau.openapi.OpenApiCoverageOptionsBuilder;5import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportOptions;6import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportOptionsBuilder;7import static org.testingisdocumenting.webtau.WebTauDsl.*;8public class OpenApiCoverageTest {9 public void shouldVerifyOpenApiCoverage() {10 OpenApiCoverageOptions options = new OpenApiCoverageOptionsBuilder()11 .withOperationCoverageThreshold(0.8)12 .withOperationCoverageReportOptions(new OpenApiCoverageReportOptionsBuilder()13 .withReportUncoveredOperations(true)14 .withReportUncoveredOperationsThreshold(0.5)15 .build())16 .build();17 OpenApiCoverageReportOptions reportOptions = new OpenApiCoverageReportOptionsBuilder()18 .withReportUncoveredOperations(true)19 .withReportUncoveredOperationsThreshold(0.5)20 .build();21 OpenApiCoverage coverage = OpenApiCoverage.create(options);22 OpenApiCoveredOperations operations = coverage.getOperations();23 coverage.verify();24 }25}26import org.testingisdocumenting.webtau.openapi.OpenApiCoverage;27import org.testingisdocumenting.webtau.openapi.OpenApiCoverageOptions;28import org.testingisdocumenting.webtau.openapi.OpenApiCoverageOptionsBuilder;29import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportOptions;30import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReportOptionsBuilder;31import static org.testingisdocumenting.webtau.WebTauDsl.*;32public class OpenApiCoverageTest {33 public void shouldVerifyOpenApiCoverage() {34 OpenApiCoverageOptions options = new OpenApiCoverageOptionsBuilder()35 .withOperationCoverageThreshold(0.8)36 .withOperationCoverageReportOptions(new OpenApiCoverageReportOptionsBuilder()37 .withReportUncoveredOperations(true)38 .withReportUncoveredOperationsThreshold(0.5)39 .build())40 .build();

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1package org.testingisdocumenting.webtau.tutorials.openapi;2import org.testingisdocumenting.webtau.Ddjt;3import org.testingisdocumenting.webtau.http.Http;4import org.testingisdocumenting.webtau.http.HttpHeader;5import org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations;6import org.testingisdocumenting.webtau.openapi.OpenApiCoverage;7import org.testingisdocumenting.webtau.utils.ResourceUtils;8import java.util.Collections;9import java.util.List;10import java.util.Map;11public class OpenApiCoveredOperationsExample {12 public static void main(String[] args) {13 OpenApiCoverage coverage = new OpenApiCoverage(14 ResourceUtils.readResource("/openapi/petstore.yaml"),15 OpenApiCoveredOperations coveredOperations = coverage.coveredOperations();16 Ddjt.table(coveredOperations.coveredOperations());17 Ddjt.table(coveredOperations.uncoveredOperations());18 }19}20package org.testingisdocumenting.webtau.tutorials.openapi;21import org.testingisdocumenting.webtau.Ddjt;22import org.testingisdocumenting.webtau.http.Http;23import org.testingisdocumenting.webtau.http.HttpHeader;24import org.testingisdocumenting.webtau.openapi.OpenApiCoveredPaths;25import org.testingisdocumenting.webtau.openapi.OpenApiCoverage;26import org.testingisdocumenting.webtau.utils.ResourceUtils;27import java.util.Collections;28import java.util.List;29import java.util.Map;30public class OpenApiCoveredPathsExample {31 public static void main(String[] args) {32 OpenApiCoverage coverage = new OpenApiCoverage(33 ResourceUtils.readResource("/openapi/petstore.yaml"),34 OpenApiCoveredPaths coveredPaths = coverage.coveredPaths();35 Ddjt.table(coveredPaths.coveredPaths());36 Ddjt.table(coveredPaths.uncoveredPaths());37 }38}39package org.testingisdocumenting.webtau.tutorials.openapi;40import org.testingisdocumenting.webtau.Ddjt;41import org.testingisdocumenting.webtau.http.Http;42import org.testingisdocumenting.webtau.http.HttpHeader;43import org.testingisdocumenting.web

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1import org.testingisdocumenting.webtau.openapi.*;2import org.testingisdocumenting.webtau.http.*;3import org.testingisdocumenting.webtau.http.datanode.*;4import org.testingisdocumenting.webtau.http.config.*;5import org.testingisdocumenting.webtau.data.*;6import org.testingisdocumenting.webtau.data.table.*;7import org.testingisdocumenting.webtau.data.render.*;8import org.testingisdocumenting.webtau.expectation.*;9import org.testingisdocumenting.webtau.expectation.handler.*;10import org.testingisdocumenting.webtau.expectation.contain.*;11import org.testingisdocumenting.webtau.expectation.equality.*;12import org.testingisdocumenting.webtau.expectation.time.*;13import org.testingisdocumenting.webtau.expectation.json.*;14import org.testingisdocumenting.webtau.expectation.json.schema.*;15import org.testingisdocumenting.webtau.expectation.json.schema.dsl.*;16import org.testingisdocumenting.webtau.expectation.json.schema.matchers.*;17import org.testingisdocumenting.webtau.expectation.json.schema.matchers.array.*;18import org.testingisdocumenting.webtau.expectation.json.schema.matchers.object.*;19import org.testingisdocumenting.webtau.expectation.json.schema.matchers.number.*;20import org.testingisdocumenting.webtau.expectation.json.schema.matchers.string.*;21import org.testingisdocumenting.webtau.expectation.json.schema.matchers.boolean.*;22import org.testingisdocumenting.webtau.expectation.json.schema.matchers.nulltype.*;23import org.testingisdocumenting.webtau.expectation.json.schema.matchers.any.*;24import org.testingisdocumenting.webtau.expectation.json.schema.matchers.unknown.*;25import org.testingisdocumenting.webtau.expectation.json.schema.matchers.integer.*;26import org.testingisdocumenting.webtau.expectation.json.schema.matchers.number.range.*;27import org.testingisdocumenting.webtau.expectation.json.schema.matchers.number.exact.*;28import org.testingisdocumenting.webtau.expectation.json.schema.matchers.number.multiple.*;29import org.testingisdocumenting.webtau.expectation.json.schema.matchers.string.format.*;30import org.testingisdocumenting.webtau.expectation.json.schema.matchers.string.pattern.*;31import org.testingisdocumenting.webtau.expectation.json.schema.matchers.string.length.*;32import org.testingisdocumenting.webtau.expectation.json.schema.matchers.string.exact.*;33import org.testingisdocumenting.webtau.expectation.json.schema.matchers.string.enumtype.*;34import org.testingisdocumenting.webtau.expectation.json.schema.matchers.string.date.*;35import org.testingisdocument

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1import org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations;2import org.testingisdocumenting.webtau.openapi.OpenApiCoverage;3OpenApiCoveredOperations coveredOperations = coverage.getCoveredOperations();4System.out.println("coveredOperations: " + coveredOperations);5System.out.println("coveredOperations.getCoveredOperations(): " + coveredOperations.getCoveredOperations());6System.out.println("coveredOperations.getCoveredOperations().size(): " + coveredOperations.getCoveredOperations().size());7System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId(): " + coveredOperations.getCoveredOperations().get(0).getOperationId());8System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId().equals(\"updatePet\"): " + coveredOperations.getCoveredOperations().get(0).getOperationId().equals("updatePet"));9System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId().equals(\"updatePet\"): " + coveredOperations.getCoveredOperations().get(0).getOperationId().equals("updatePet"));10System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId().equals(\"updatePet\"): " + coveredOperations.getCoveredOperations().get(0).getOperationId().equals("updatePet"));11System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId().equals(\"updatePet\"): " + coveredOperations.getCoveredOperations().get(0).getOperationId().equals("updatePet"));12System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId().equals(\"updatePet\"): " + coveredOperations.getCoveredOperations().get(0).getOperationId().equals("updatePet"));13System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId().equals(\"updatePet\"): " + coveredOperations.getCoveredOperations().get(0).getOperationId().equals("updatePet"));14System.out.println("coveredOperations.getCoveredOperations().get(0).getOperationId().equals(\"updatePet\"): " + coveredOperations.getCoveredOperations().get(0).getOperationId().equals("updatePet"));15System.out.println("coveredOperations.getCoveredOperations().get(0

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1import org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations;2import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReport;3import org.testingisdocumenting.webtau.openapi.OpenApiCoverageResults;4OpenApiCoverageResults results = OpenApiCoverageResults.create();5OpenApiCoveredOperations coveredOperations = results.getCoveredOperations();6OpenApiCoverageReport report = results.getReport();7import org.testingisdocumenting.webtau.openapi.OpenApiCoverageResults;8import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReport;9OpenApiCoverageResults results = OpenApiCoverageResults.create();10OpenApiCoverageReport report = results.getReport();11import org.testingisdocumenting.webtau.openapi.OpenApiCoverageReport;12OpenApiCoverageReport report = OpenApiCoverageReport.create();13report.getCoverage();14report.getOperations();15report.getOperations();16report.getOperations();

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1import org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations;2import java.util.List;3public class 1 {4 public static void main(String[] args) {5 List<String> coveredOperations = openApiCoveredOperations.getCoveredOperations();6 List<String> notCoveredOperations = openApiCoveredOperations.getNotCoveredOperations();7 System.out.println("Covered operations: " + coveredOperations);8 System.out.println("Not covered operations: " + notCoveredOperations);9 }10}

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1public class 1 {2 public void test() {3 OpenApiCoveredOperations coveredOperations = new OpenApiCoveredOperations();4 coveredOperations.addOperation("GET", "/v1/pets/{petId}");5 coveredOperations.addOperation("POST", "/v1/pets");6 coveredOperations.addOperation("PUT", "/v1/pets/{petId}");7 coveredOperations.addOperation("DELETE", "/v1/pets/{petId}");8 OpenApiValidator.validateOpenApi("/v1/swagger.json", coveredOperations);9 }10}

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1OpenApiCoveredOperations coveredOperations = OpenApiCoveredOperations.fromOpenApi(openApi);2coveredOperations.reportUncoveredOperations();3OpenApiCoveredOperations.fromOpenApi(openApi).reportUncoveredOperations();4OpenApiCoveredOperations coveredOperations = OpenApiCoveredOperations.fromOpenApi(openApi);5coveredOperations.addOperationValidationRule(new MyCustomOperationValidationRule());6coveredOperations.reportUncoveredOperations();7OpenApiCoveredOperations.fromOpenApi(openApi)8 .addOperationValidationRule(new MyCustomOperationValidationRule())9 .reportUncoveredOperations();10OpenApiCoveredOperations coveredOperations = OpenApiCoveredOperations.fromOpenApi(openApi);11coveredOperations.addOperationValidationRule(new MyCustomOperationValidationRule());12coveredOperations.setOperationValidator(new MyCustomOpenApiOperationValidator());13coveredOperations.reportUncoveredOperations();14OpenApiCoveredOperations.fromOpenApi(openApi)15 .addOperationValidationRule(new MyCustomOperationValidationRule())16 .setOperationValidator(new MyCustomOpenApiOperationValidator())17 .reportUncoveredOperations();18OpenApiCoveredOperations coveredOperations = OpenApiCoveredOperations.fromOpenApi(openApi);19coveredOperations.addOperationValidationRule(new MyCustomOperationValidationRule());20coveredOperations.setOperationValidator(new MyCustomOpenApiOperationValidator());21coveredOperations.setOperationValidator(new MyCustomOpenApiOperationValidator());22coveredOperations.reportUncoveredOperations();23OpenApiCoveredOperations.fromOpenApi(openApi)24 .addOperationValidationRule(new My

Full Screen

Full Screen

OpenApiCoveredOperations

Using AI Code Generation

copy

Full Screen

1import org.testingisdocumenting.webtau.WebTauDsl;2import org.testingisdocumenting.webtau.http.Http;3import org.testingisdocumenting.webtau.http.HttpHeader;4import org.testingisdocumenting.webtau.http.HttpResponse;5import org.testingisdocumenting.webtau.openapi.OpenApiCoveredOperations;6import org.testingisdocumenting.webtau.openapi.OpenApiSpec;7import org.testingisdocumenting.webtau.reporter.StepReportOptions;8import org.testingisdocumenting.webtau.reporter.WebTauStep;9import org.testingisdocumenting.webtau.reporter.WebTauStepOutput;10import org.testingisdocumenting.webtau.reporter.WebTauStepOutputPayload;11import org.testingisdocumenting.webtau.reporter.WebTauStepOutputPayloadType;12import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValue;13import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueList;14import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueMap;15import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueMapEntry;16import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueString;17import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueStringList;18import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueStringMap;19import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueStringMapEntry;20import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTable;21import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableEntry;22import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableHeader;23import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableHeaderEntry;24import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableValue;25import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableValueList;26import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableValueMap;27import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableValueMapEntry;28import org.testingisdocumenting.webtau.reporter.WebTauStepOutputValueTableValueString;29import org.testingisdocumenting.webtau.reporter.WebTauStepOutput

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Webtau automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Test Your Web Or Mobile Apps On 3000+ Browsers

Signup for free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful