1
私はPOSTMANクライアントを使用しており、csvファイルからデータを読み取ろうとしています。 PoCとして、私は8月郵便番号を使用したデータ駆動テスト
以下では、エンドポイントURL
https://www.googleapis.com/books/v1/volumes?q=Light以下で使用している私のコードそれが失敗している
tests["Status code is 200"] = responseCode.code === 200;
postman.setEnvironmentVariable("requestBook", data.requestBook);
var response = JSON.parse(responseBody);
tests["Validate the title is correctly populated"] = /{{title}}/.test(response.items[0].volumeInfo.title);
tests["Validate the author is correctly populated"] = /{{authors}}/.test(response.items[0].volumeInfo.authors);
tests["Validate the publisher is correctly populated"] = /{{publisher}}/.test(response.items[0].volumeInfo.publisher);
tests["Validate the published date is correctly populated"] = /{{publishedDate}}/.test(response.items[0].volumeInfo.publishedDate);
tests["Validate the page count is correctly populated"] = /{{pageCount}}/.test(response.items[0].volumeInfo.pageCount);
tests["Validate the category is correctly populated"] = /{{categories}}/.test(response.items[0].volumeInfo.categories);
tests["Validate the amount is correctly populated"] = /{{amount}}/.test(response.items[0].saleInfo.listPrice.amount);
tests["Validate the currency code is correctly populated"] = /{{currencyCode}}/.test(response.items[0].saleInfo.listPrice.currencyCode);
です。私はプレビューをクリックすると、すべての私のデータは、私はそれゆえソリューションはその解決を発見した二重引用符で囲ま
解決策が見つかりましたので解決しました。新しいコードはテストです "[タイトルが正しく入力されたことを検証する]] = response.items [0] .volumeInfo.title === data.title; –
代わりにこのコメントを回答として書き込み、それを受け入れます。それはあなたに少しの評判をもたらし、他の開発者にとってもその答えを見やすくするでしょう。 – Ray
私はしようとしましたが、ボタンが見つからない "答え" –