投稿時間:2022-02-09 00:33:03 RSSフィード2022-02-09 00:00 分まとめ(39件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Appleの整備済み商品情報 2022/2/8 https://taisy0.com/2022/02/08/151769.html apple 2022-02-08 14:48:05
TECH Engadget Japanese 次のニンテンドーダイレクトは2月10日朝7時、Nintendo Switch新作中心に約40分 https://japanese.engadget.com/nintendo-direct-2022-2-10-142539941.html nintendo 2022-02-08 14:25:39
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 日産、純利益2050億円に上方修正 売上高は8.7兆円に下方修正 https://www.itmedia.co.jp/business/articles/2202/08/news167.html itmedia 2022-02-08 23:23:00
AWS AWS Architecture Blog How UnitedHealth Group Improved Disaster Recovery for Machine-to-Machine Authentication https://aws.amazon.com/blogs/architecture/how-unitedhealth-group-improved-disaster-recovery-for-machine-to-machine-authentication/ How UnitedHealth Group Improved Disaster Recovery for Machine to Machine AuthenticationThis blog post was co authored by Vinodh Kumar Rathnasabapathy Senior Manager of Software Engineering UnitedHealth Group nbsp Engineers who use Amazon Cognito for machine to machine authentication select a primary Region where they deploy their application infrastructure and the Amazon Cognito authorization endpoint Amazon Cognito is a highly available service in single Region deployments with a published service level … 2022-02-08 14:17:33
AWS AWS Management Tools Blog Automate time series network visualizations for AWS PrivateLink using Amazon CloudWatch Contributor Insights https://aws.amazon.com/blogs/mt/automate-time-series-network-visualizations-for-aws-privatelink-using-amazon-cloudwatch-contributor-insights/ Automate time series network visualizations for AWS PrivateLink using Amazon CloudWatch Contributor InsightsAWS PrivateLink is a highly available scalable technology that lets you connect your Amazon Virtual Private Cloud VPC to supported AWS services without requiring public internet traversal It also lets you privately connect to services hosted by other AWS accounts VPC endpoint services and supported AWS Marketplace partner services Amazon CloudWatch Contributor Insights is a … 2022-02-08 14:15:28
AWS AWS Management Tools Blog Use AWS Systems Manager Automation to automate Snowflake storage integrations with Amazon S3 https://aws.amazon.com/blogs/mt/use-aws-systems-manager-automation-to-automate-snowflake-storage-integrations-with-amazon-s3/ Use AWS Systems Manager Automation to automate Snowflake storage integrations with Amazon SAWS Systems Manager lets you safely automate common and repetitive IT operations and management tasks Furthermore Systems Manager Automation lets you use predefined playbooks or you can build run and share wiki style automated playbooks to enable AWS resource management across multiple accounts and AWS Regions Snowflake the Data Cloud is an APN Partner that provides … 2022-02-08 14:14:42
AWS AWS Japan Blog AWS Health Aware — 組織および個人の AWS アカウントの AWS Health アラートのカスタマイズ https://aws.amazon.com/jp/blogs/news/aws-health-aware-customize-aws-health-alerts-for-organizational-and-personal-aws-accounts/ AHAを導入することにより、AWSHealthからのプロアクティブでリアルタイムなアラートを普段使っているコミュニケーションツールに連携することができます。 2022-02-08 14:09:21
python Pythonタグが付けられた新着投稿 - Qiita Python+Pulpを使ってシフト表を自動作成 https://qiita.com/ookamikujira/items/862ec78914d5deb549c1 PythonPulpを使ってシフト表を自動作成はじめに後々加筆修正予定もう少し分かりやすく加筆修正する予定ですがとりあえずうp以前、こういった動画を見ました。 2022-02-08 23:58:15
js JavaScriptタグが付けられた新着投稿 - Qiita JavaScriptの関数宣言 https://qiita.com/m-kawakami/items/0a24b105be066acb7b3d JavaScriptの関数宣言関数通常の関数ごく普通の関数の定義と呼び出し宣言場所が、呼び出しの後でも機能する巻き上げが起こる構文function関数名処理例functionAAAaaaconsolelog引数はaaaAAA引数関数呼び出し無名関数関数式関数名が無い関数他の関数の引数に指定したり、変数に格納して使用することができる宣言場所が、呼び出しの前でなければ機能しない巻き上げが起こらない構文const変数名function引数処理例constsumfunctionabcreturnabcconsttotalsum関数呼び出しアロー関数無名関数のfunctionをgtで表現したものIEでは使用できない構文const変数名引数gt処理例constsumabcgtreturnabcconsttotalsum関数呼び出し関数の中身が行のみreturnの場合を省略して行で書けるconstsumabcgtabcさらに、引数が一つの場合、も省略できるconstsumagtaただし引数がない場合はを省略できないconstsumgt処理即時関数関数宣言と同時に実行する構文function仮引数処理引数例functionnameconsolelogこんにちは、nameまいこんな使い方もありユーザーエージェントでデバイスの判定constdevicefunctionifnavigatoruserAgentmatchiPhoneAndroidMobilereturnmobileelsereturnpcアロー関数は慣れないと暗号にしか見えませんが、引数gt処理となっているのでこの引数でこの処理してねと言っているように見えなくもない。 2022-02-08 23:09:42
AWS AWSタグが付けられた新着投稿 - Qiita S3のログをAthenaから操作する(Terraform) https://qiita.com/hengineer/items/7a134b9e827606246dfa 次にコンソールからAthenaのサービス画面へ行き、実際にDDLを実行してテーブルを作成していきます。 2022-02-08 23:38:15
AWS AWSタグが付けられた新着投稿 - Qiita LightSailでWebサーバを立てる https://qiita.com/yoshiki_mbp/items/9fb32bbd4d16b0f62266 インスタンスの作成をクリック静的IPアドレスの作成画面遷移Lightsailのホーム画面ネットワーキングタブ静的IPの作成設定項目インスタンスへのアタッチ作成したインスタンスを選択する。 2022-02-08 23:37:49
GCP gcpタグが付けられた新着投稿 - Qiita Google Cloud アップデート (1/27-2/2/2022) https://qiita.com/kenzkenz/items/c95b51965bf29d9b9f83 GoogleCloudアップデートCloudLoadBalancingJanInternalHTTPSLBでsharedVPC対応がプレビューになったよhostやserviceプロジェクトでフロントエンドとURLmapを作成して、バックエンドサービスとバックエンドを複数のserviceプロジェクトに分散できるComputeEngineJanvCPU、メモリGBのインスタンスタイプでTGPUがアタッチされたVMがGAになったよDataprocMetastoreJanvbetaHiveのメタストアがプライマリにアタッチされるAuxiliaryversionsがプレビューになったよストレージをデフォルトのMySQLからSpannerにできるのがプレビューになったよCloudAssetInventoryJanGameservicesのいくつかが追加されたよCloudComposerJanDAGUI機能がロールバックされたよ次のリリースで再リリース予定ConfigConnectorJanリリースGKEJanからイベントのログに含まれるタイムスタンプが空でなければ利用されるようになるよksioapicorev、ksioapieventsvのフィールドが該当AnthosConfigManagementJan重複したメトリクスや必須でないタグを減らしたよOPAGatekeeperの更新legacyモードで管理外のネームスペースが、リポジトリから削除された際に削除される問題を修正したよgitsyncconfigmapにgitプロキシのクレデンシャルが入ってる場合にnomosbugreportコマンドで含まれていたのを修正したよCloudStorageJanobjectadminロールがstoragemultipartUploadsを含むようになったよCloudStorageTransferServiceJanつのファイルシステムを定期的に同期する機能がプレビューになったよtoFilestoreとかで使えるPOSIXのattributesとシンボリックリンクの保持がプレビューになったよIAMJanサービスアカウントキーの期限を設定できる機能がプライベートプレビューになったよ使いたい場合はリクエストしてね要orgAnthosJanリリース複数のCVE修正AnthosclustersonAWSJangkeが利用可能に対応複数のCVE修正のリリースノートが更新されて、どのサービスアカウントに権限が不要になったか更新されたよWorkflowsJanveuropewesteuropewestuseastで利用可能にSAPJanRHELとSLESHAクラスタでHANAHADRプロバイダのフックが更新されたよCloudHealthcareAPIJanvHealthcareNaturalLanguageAPIがVertexAIを使うようになったよAnthosJanコンソールでDashboardがプロジェクトまたいだクラスタやonprembaremetalをサポートするようになったよCloudCDNJancustomnamedcookiesとヘッダのキャッシュキーがGAになったよmultivariateのABテストやcanaryバックエンドバケットのクエリパラメータを許可するのが有効化されてキャッシュ場スティングできるようになったよBigQueryMLJanExplainableAIがGAになったよTranslationAPIJanvのregionalEUendpointがGAになったよGAEJanビルドがリージョナルのCloudBuildで実行されるようになったよOperationsSuiteJanCloudLoggingMonitoringOpsAgentがTomcatPostgreSQLに対応したよCloudLoggingElasticsearchに対応したよexcludelogsでログの除外ができるようになったよOperationsSuiteFebCloudMonitoringカスタムダッシュボードでSLOが見れるようになったよGKEFeblinuxカーネルのCVEつCVECVECVEが全てのGKEとAnthosonpremに影響するよGKESandbox使ってる場合は影響なしWorkflowsJanvPCIDSS対応したよDocumentAIJanvbetavナレッジグラフを使ったエンリッチがGAになったよCloudKMSJanVPCでEKMが使えるのがプレビューになったよプライベートエンドポイント経由でEKMにアクセスできるようにCloudSQLFebPostgreSQLQueryInsightsがサンプリングレートを変えられるようになったよBigQueryJanaggregationやinnerjoinを使わなくてもmaterializedviewが使えるようになったよSecurityCommandCenterJanPremiumでVirtualMachineThreatDetectionがプレビューになったよクリプトマイニングを検知できるようにWebSecurityScannerで色々ディテクタ追加ComputeEngineFebCentOSがdeprecatedに。 2022-02-08 23:50:22
技術ブログ Developers.IO Amazon SESで設定セット削除後にメール送信が”Configuration set does not exist.”となり送信できなくなった時の対処 https://dev.classmethod.jp/articles/sending-emails-after-deleting-a-configuration-set-in-amazon-ses-configuration-configuration-setset-does-not-exist-what-to-do-when-it-becomes-and-cannot-be-sent/ urationsetconfiguration 2022-02-08 14:53:12
海外TECH Ars Technica SpaceX’s Starship update comes at a critical time for the program https://arstechnica.com/?p=1832415 critical 2022-02-08 14:02:29
海外TECH MakeUseOf The Dos and Don’ts of Using Tech to Stay Fit and Healthy https://www.makeuseof.com/dos-and-donts-stay-fit-healthy/ fitness 2022-02-08 14:46:52
海外TECH MakeUseOf The 7 Best Lightweight Web Browsers for Linux https://www.makeuseof.com/best-lightweight-web-browsers-linux/ browser 2022-02-08 14:30:12
海外TECH MakeUseOf The 9 Best Resume Tips to Stand Out to Recruiters https://www.makeuseof.com/best-resume-tips-to-stand-out/ resume 2022-02-08 14:16:44
海外TECH MakeUseOf The Bluesound Pulse Flex 2i Speaker Is a Masterpiece of Multiroom Sound Tech https://www.makeuseof.com/bluesound-pulse-flex-2i-wireless-multiroom-speaker-review/ The Bluesound Pulse Flex i Speaker Is a Masterpiece of Multiroom Sound TechThe Bluesound Pulse Flex i wireless bookshelf speaker works perfectly integrated into your existing Hi Fi or as a standalone indoor device 2022-02-08 14:06:46
海外TECH DEV Community JUnit 5 vs. TestNG: Choosing The Right Framework For Selenium Automation Testing https://dev.to/shalinibaskaran12/junit-5-vs-testng-choosing-the-right-framework-for-selenium-automation-testing-g28 JUnit vs TestNG Choosing The Right Framework For Selenium Automation TestingA framework is a backbone for testing or development activities It is a set of components that helps frame the tests execute the tests and generate the final report of execution The approach used for designing the test automation framework plays a crucial part in the testing activity JUnit and TestNG are considered some of the best Java testing frameworks for Selenium automation testing You should choose the appropriate test framework for your project s requirements JUnit is the latest version of the JUnit framework In this blog we do a JUnit vs TestNG comparison The TestNG framework is inspired by the JUnit and NUnit frameworks However TestNG outperforms JUnit in parameterized testing suite testing and dependency testing In this blog on JUnit vs TestNG comparison we explore the differences between the JUnit and TestNG from the perspective of Selenium WebDriver By the end of this blog you would be in a position to choose the best suited framework for realizing your Selenium automation testing tasks Let s begin Overview of JUnitJUnit is one of the best unit testing frameworks for Selenium Java automation testing The entire application being developed would first undergo unit testing that the developers perform on small code chunks Thus by testing individual code chunks the developer would be able to test the code and locate bugs if any The latest version of JUnit is JUnit and it has three different sub components JUnit Platform JUnit Jupiter and JUnit Vintage The JUnit platform is the basic foundation of the JUnit framework JUnit Jupiter is used for writing the tests and the JUnit Vintage is used for running earlier versions of JUnit tests such as JUnit and JUnit based tests Refer to our learning hub on the Selenium JUnit tutorial to delve deeper into the JUnit framework If you still use JUnit or previous versions and wish to migrate your tests to JUnit please explore JUnit vs JUnit comparison This JUnit Tutorial for beginners and professionals will help you learn how to use JUnit framework with Selenium and Java for performing Selenium automation testing Overview of TestNGTestNG is another popular open source Java based unit testing framework that provides complete control over the test cases and their execution It aids in writing robust and flexible test cases by using various features like TestNG annotations prioritization grouping and parameterization It simplifies the way of writing test cases It is relatively simple to implement tests with TestNG making it easy for the users to implement and maintain the code It has multiple built in features that eliminate the need for external plugins For more information around the TestNG framework for Selenium automation testing check out our learning hub on the Selenium TestNG tutorial Difference between JUnit vs  TestNGTo choose the perfect framework between JUnit vs TestNG for Selenium automation let us first understand the differences between JUnit and TestNG It is important to note that we are comparing JUnit and not JUnit with TestNG Also some features like parallel execution with JUnit are still in the Beta stage though the features work as per the expectations JUnit and TestNG Setup and InstallationIn this section of the JUnit vs TestNG framework comparison we look at how to install and configure JUnit and TestNG framework Installing and setting up JUnitStep JUnit requires Java version or above versions for running the tests You can download Java from the official website Step In the case of a Java project download the JUnit jars from Step Open the project and add these external jars through build path configuration Step In the case of the Maven project download maven from the official website Step Set up the environment variables Step Add the below dependencies in pom xml for running our JUnit tests lt dependencies gt lt dependency gt lt groupId gt org junit jupiter lt groupId gt lt artifactId gt junit jupiter engine lt artifactId gt lt version gt lt version gt lt scope gt test lt scope gt lt dependency gt lt dependency gt lt groupId gt org junit platform lt groupId gt lt artifactId gt junit platform runner lt artifactId gt lt version gt lt version gt lt scope gt test lt scope gt lt dependency gt lt dependency gt lt groupId gt org junit jupiter lt groupId gt lt artifactId gt junit jupiter api lt artifactId gt lt version gt lt version gt lt scope gt test lt scope gt lt dependency gt lt dependencies gt You can also refer to our JUnit video tutorial on how to install JUnit amp youtube cggWYDNDrAw Installing and Setting up of TestNGStep Download Java from the official website Step In the case of a Java project download the jar from Step Open the project and add these external jars through build path configuration Step In the case of the Maven project download maven from the official website Step Set up the environment variables Step Add the TestNG dependency in the pom xml file lt dependency gt lt groupId gt org TestNG lt groupId gt lt artifactId gt TestNG lt artifactId gt lt version gt lt version gt lt scope gt test lt scope gt lt dependency gt Once the setup is completed you are ready to go… Test Suites in JUnit and TestNGA test suite is a collection of tests to be executed in a framework The test suite defines the test cases and can be quickly executed JUnit suiteIn JUnit the test suite is defined with RunWith and Suite annotations When we annotate a class with RunWith annotation the framework will invoke the given class as the test runner instead of running the default one The below example specifies a group of test classes to be run along with the class RunWith Suite class Suite SuiteClasses JUnitTest class JUnitTest class TestNG suiteIn TestNG the suite is defined in an XML file lt xml version encoding UTF gt lt DOCTYPE suite SYSTEM gt lt suite name TestSuite parallel tests gt lt test name DemoTest gt lt classes gt lt class name com pages LoginPageTest gt lt class gt lt class name com pages HomePageTest gt lt class gt lt class name com pages ProductPageTest gt lt class gt lt classes gt lt test gt lt suite gt Here s a short glimpse of the TestNG certification from LambdaTest Annotations in JUnit and TestNGAnnotations give additional information about the class or test method in the test automation framework Read our detailed tutorial on TestNG annotations for Selenium automation to know more about the usage of annotations in TestNG JUnit annotationsThe annotations in JUnit are a bit different even from its previous versions of JUnit Shown below are some of the popular JUnit annotations Test This annotation is used for declaring a test TestFactory This annotation is used for defining a method which is a test factory It is used for the runtime generation of dynamic tests RepeatedTest This annotation is used to specify that the method is a template for the tests that can be repeated a specific number of times For example the below test method is annotated with RepeatedTest for a specific number which indicates that this test will be repeated automatically five times RepeatedTest public void print    write some code to be executed ParameterizedTest This annotation is used to indicate that the method is a parameterized test These parameterized tests are similar to standard test methods but we have to specify a source to provide parameters that would be used for every test TestMethodOrder This annotation is used to define the order of the test execution DisplayName This annotation is used to specify a customized display name for the method or class Tag This annotation is used for filtering the tests at the method or class level by defining the tags Disabled This annotation is used to disable a test method or class BeforeEach This annotation is used to specify that the said test method has to be executed before each test RepeatedTest ParameterizedTest or TestFactory method AfterEach This annotation is used to specify that the specific test method has to be executed after each test RepeatedTest ParameterizedTest or TestFactory method BeforeAll This annotation is used to specify that the specific test method has to be executed before all test RepeatedTest ParameterizedTest or TestFactory methods AfterAll This annotation is used to specify that the specific test method has to be executed after all Test RepeatedTest ParameterizedTest or TestFactory methods TestNG annotationsBelow are the various annotations used in TestNG BeforeMethod This will be executed before every test annotated method AfterMethod This annotation will be executed after every Test annotated method BeforeClass This will be executed before the first test method execution It will be executed one only time throughout the test case AfterClass This will be executed after all test methods in the current class have been run BeforeTest This will be executed before the first test annotated method It can be executed multiple times before the test case AfterTest A method with this annotation will be executed when all test annotated methods complete the execution of those classes inside the tag in the testng xml file BeforeSuite It will run only once before all tests in the suite are executed AfterSuite A method with this annotation will run once after the execution of all tests in the suite is complete BeforeGroups This method will run before the first test run of that specific group AfterGroups This method will run after all test methods of that group complete their execution Test This is used for declaring a test Quick Comparison of JUnit and TestNG AnnotationsLet s compare the annotations between JUnit vs TestNG PurposeTestNGJUnit Defines the method as the test method Test T estThe method that is annotated is executed before the first test method of the class BeforeClass BeforeAllThe method that is annotated is executed after all the test methods of the current class have been executed AfterClass AfterAllThe method that is annotated is executed before each test method BeforeMethod BeforeEachThe method that is annotated is executed after each test method AfterMethod AfterEachThe method that is annotated is executed before the suit BeforeSuiteNAThe method that is annotated is executed after suit AfterSuiteNAThe method that is annotated is executed before the test BeforeTestNAThe method that is annotated is executed before the test AfterTestNAThe method that is annotated is executed before the first test method of any of these groups BeforeGroupsNAThe method that is annotated is executed after the first test method of any of these groups AfterGroupsNAHere s a short glimpse of the JUnit certification from LambdaTest Ignoring Tests in JUnit and TestNGIn our automation framework we would have some test cases which have to be avoided for some reason For example it would have been obsolete or changed the requirement In such cases those cases have to be ignored so that they are not considered in the test run Let us now see how to handle such cases in JUnit and TestNG Ignoring tests in JUnit To ignore a test we can use Ignore annotation Ignorepublic void oldTest   System out println This test has to be ignored Testpublic void newTest   System out println Test has been executed Running the above tests would ignore the first test which is annotated with Ignore annotation Console Output Ignoring tests in TestNGTo ignore a test in TestNG we can pass a parameter in the Test method package com pages import org TestNG annotations Test public class SimpleTest Test public void test System out println This is test Test enabled false public void test System out println This is test The second test has been disabled so running the class would ignore the second case Console Output Grouping Tests in JUnit and TestNGGrouping of tests helps us to identify the tests and execute them quickly Let us now see how to group the tests in TestNG and JUnit Grouping tests in JUnit In JUnit we can use an annotation Tag which helps us to group our tests package demo import org junit jupiter api Tag import org junit jupiter api Test public class SimpleTest Test Tag Smoke public void Test System out println Test has been executed Test Tag Smoke public void Test System out println Test has been executed Test Tag Regression public void Test System out println Test has been executed We add the tag in the Run configurations to execute our tests specific to a tag and then execute it In the example we have grouped only one test under Regression and hence only one will be executed when the Regression tag is specified Console Output Grouping tests in TestNGFor grouping tests in TestNG under the same category we use groups parameters along with Test annotation package com pages import org TestNG annotations AfterTest import org TestNG annotations BeforeTest import org TestNG annotations Test public class DemoTest BeforeTest public static void start System out println Starting TestNG tests Test groups Sanity Regression public void test method Test implementation Test groups Sanity public void test method Test implementation Test groups Regression public void test method Test implementation AfterTest public static void end System out println All the tests are executed successfully To execute the tests belonging to a specific category we have to add the group name in the testng xml file We can include or exclude multiple groups before executing the tests lt xml version encoding UTF gt lt DOCTYPE suite SYSTEM gt lt suite name TestSuite parallel methods thread count gt lt test name DemoTest gt lt groups gt lt run gt lt include name Sanity gt lt include gt lt exclude name Regression gt lt exclude gt lt run gt lt groups gt lt classes gt lt class name com pages DemoTest gt lt class gt lt classes gt lt test gt lt suite gt In the above snippet we have two groups Sanity and Regression In the testng xml we have included the Sanity group and excluded the Regression group After test execution we could only see the second test being executed as it belongs only to the Sanity group Console Output Parameterizing Tests in JUnit and TestNGParameterizing the tests helps us provide different sets of inputs to test the same test scenario Now let us see how to parameterize the tests using JUnit and TestNG Parameterizing tests in TestNGThere are two ways to parameterize the tests in TestNG Using Parameters and passing the value of the parameter in the TestNG XML fileUsing DataProvider annotation in TestNGParameterizing the tests using Parameterspackage com pages import org TestNG annotations Parameters import org TestNG annotations Test public class SimpleTest Test Parameters username public void test String username System out println The username username is passed In the above example we have used Parameter annotation to provide a username The value will be specified in the testng xml file lt xml version encoding UTF gt lt DOCTYPE suite SYSTEM gt lt suite name TestSuite parallel tests gt lt test name DemoTest gt lt parameter name username value Alex gt lt classes gt lt class name com pages SimpleTest gt lt class gt lt classes gt lt test gt lt suite gt Console OutputParameterizing using DataProvidersThe DataProviders annotation is used to provide multiple input values to the test It has a separate data provider method that is used to pass the parameters Scenario To test the login functionality of a webpage using different sets of credentials package com pages import org openqa selenium By import org openqa selenium WebDriver import org openqa selenium WebElement import org openqa selenium chrome ChromeDriver import org openqa selenium support ui ExpectedConditions import org openqa selenium support ui WebDriverWait import org TestNG annotations import java util concurrent TimeUnit public class SimpleTest WebDriver driver String url BeforeTest public void setup System out println Setting up the drivers System setProperty webdriver chrome driver C Users Shalini Downloads chromedriver latest chromedriver exe driver new ChromeDriver Test dataProvider credentials public void LoginTest String username String password driver get url driver manage window maximize driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement login driver findElement By xpath a text Login login click WebElement name driver findElement By xpath input name email WebElement passwd driver findElement By xpath input name password WebDriverWait wait new WebDriverWait driver wait until ExpectedConditions visibilityOf name name clear name sendKeys username passwd clear passwd sendKeys password WebElement loginButton driver findElement By xpath button text Login loginButton click System out println Logged in successfully DataProvider name credentials public Object getUserInput return new Object abc gmail com xaxxdssc alexdan gmail com mypasswd myemail yahoo com textmypass AfterTest public void tearDown driver close In the above example we have added a test case for the login functionality in a webpage First we would locate the webelements for entering the username and password WebElement name driver findElement By xpath input name email WebElement passwd driver findElement By xpath input name password After locating the elements we need to pass different sets of inputs to username and password name clear name sendKeys username passwd clear passwd sendKeys password WebElement loginButton driver findElement By xpath button text Login loginButton click As mentioned earlier in order to pass different parameters we would use Dataproviders We implement a Dataprovider method to pass different sets of input and will provide a unique name to identify the data provider DataProvider name credentials public Object getUserInput return new Object abc gmail com xaxxdssc alexdan gmail com mypasswd myemail yahoo com textmypass To use these inputs in our tests we provide a parameter dataprovider along with the unique name within the Test annotation Test dataProvider credentials public void LoginTest String username String password FileName testng xml lt xml version encoding UTF gt lt DOCTYPE suite SYSTEM gt lt suite name TestSuite parallel tests gt lt test name DemoTest gt lt classes gt lt class name com pages SimpleTest gt lt class gt lt classes gt lt test gt lt suite gt Console Output Parameterizing tests in JUnit JUnit provides different ways to parameterize the tests akin to parameterizing in JUnit framework As this article primarily focuses on JUnit let us see how to parameterize the tests in JUnit You will have to add the below dependency to parameterize the tests in JUnit lt dependency gt lt groupId gt org junit jupiter lt groupId gt lt artifactId gt junit jupiter params lt artifactId gt lt version gt lt version gt lt scope gt test lt scope gt lt dependency gt Below is the code snippet to run our tests in different browsers by parameterizing the browsers import org junit jupiter api import org junit jupiter params ParameterizedTest import org junit jupiter params provider Arguments import org junit jupiter params provider MethodSource import org openqa selenium By import org openqa selenium WebDriver import org openqa selenium WebElement import org openqa selenium chrome ChromeDriver import org openqa selenium firefox FirefoxDriver import java util concurrent TimeUnit import java util stream Stream import static org junit jupiter params provider Arguments arguments public class JUnitParamTest String urlToTest WebDriver driver public void browser setup String browser System out println Setting up the drivers and browsers if browser equalsIgnoreCase Chrome System setProperty webdriver chrome driver C Users Shalini Downloads chromedriver latest chromedriver exe driver new ChromeDriver if browser equalsIgnoreCase Firefox System setProperty webdriver gecko driver C Users Shalini Downloads geckodriver geckodriver exe driver new FirefoxDriver ParameterizedTest MethodSource browser public void enterAndDisplayMessage String browser browser setup browser String inputString Hello String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started System out println Launching LambdaTest selenium playground website started driver get urlToTest driver manage window maximize driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement textBox driver findElement By xpath input id user message textBox sendKeys inputString WebElement showButton driver findElement By id showInput showButton click WebElement messageDisplayed driver findElement By xpath div id user message span id message String message messageDisplayed getText Assertions assertEquals inputString message System out println Execution of methodName has ended AfterEach public void tearDown System out println Quitting the browsers has started driver quit System out println Quitting the browsers has ended AfterAll public static void end System out println Tests ended static Stream lt Arguments gt browser return Stream of arguments Chrome arguments Firefox As we have parameterized two different browsers our tests will be executed in two browsers Console Output Prioritizing tests in JUnit and TestNGSetting priority for the test cases is pretty important during the test execution as it helps find the critical defects in essential features Though developing atomic test cases is considered as one of the Selenium best practices there could be scenarios where you may have to devise inter dependent tests Prioritizing the tests in JUnit In JUnit the execution order of tests or priority of the tests can be set using Order annotation We also have to use TestMethodOrder MethodOrderer OrderAnnotation class to execute the tests in a pre defined order In the below example we have two tests enterAndDisplayMessage and addAndDisplayResult The test enterAndDisplayMessage has the order set to and the test addAndDisplayResult has the order set to import org junit jupiter api import org junit jupiter params ParameterizedTest import org junit jupiter params provider MethodSource import org openqa selenium By import org openqa selenium WebDriver import org openqa selenium WebElement import org openqa selenium chrome ChromeDriver import java util concurrent TimeUnit TestMethodOrder MethodOrderer OrderAnnotation class public class OrderTests String urlToTest WebDriver driver BeforeAll public static void start System out println Starting junit tests BeforeEach public void setup System out println Setting up the drivers System setProperty webdriver chrome driver C Users Shalini Downloads chromedriver latest chromedriver exe driver new ChromeDriver Test Order public void enterAndDisplayMessage String inputString Hello World String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started System out println Launching LambdaTest selenium playground website started driver get urlToTest driver manage window maximize driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement textBox driver findElement By xpath input id user message textBox sendKeys inputString WebElement showButton driver findElement By id showInput showButton click WebElement messageDisplayed driver findElement By xpath div id user message span id message String message messageDisplayed getText Assertions assertEquals inputString message System out println Execution of methodName has ended Test Order public void addAndDisplayResult String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started System out println Launching LambdaTest selenium playground website started driver get urlToTest driver manage window maximize driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement input driver findElement By id sum input sendKeys WebElement input driver findElement By id sum input sendKeys WebElement addButton driver findElement By xpath id gettotal button contains class selenium btn addButton click WebElement resultDisplayed driver findElement By id addmessage String result resultDisplayed getText Assertions assertEquals result System out println Execution of methodName has ended AfterEach public void tearDown System out println Quitting the browsers has started driver quit System out println Quitting the browsers has ended AfterAll public static void end System out println Tests ended Console OutputUpon execution we could see the tests being executed in the order provided Prioritizing tests in TestNGIn TestNG we can set the execution order or priority by providing the parameter priority and the Test annotation package com pages import org openqa selenium By import org openqa selenium WebDriver import org openqa selenium WebElement import org openqa selenium chrome ChromeDriver import org TestNG Assert import org TestNG annotations AfterTest import org TestNG annotations BeforeTest import org TestNG annotations Test import java util concurrent TimeUnit public class TestNGOrder String urlToTest WebDriver driver BeforeTest public void setup System out println Setting up the drivers System setProperty webdriver chrome driver C Users Shalini Downloads chromedriver latest chromedriver exe driver new ChromeDriver Test priority public void enterAndDisplayMessage String inputString Hello World String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started System out println Launching LambdaTest selenium playground website started driver get urlToTest driver manage window maximize driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement textBox driver findElement By xpath input id user message textBox sendKeys inputString WebElement showButton driver findElement By id showInput showButton click WebElement messageDisplayed driver findElement By xpath div id user message span id message String message messageDisplayed getText Assert assertEquals inputString message System out println Execution of methodName has ended Test priority public void addAndDisplayResult String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started System out println Launching LambdaTest selenium playground website started driver get urlToTest driver manage window maximize driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement input driver findElement By id sum input sendKeys WebElement input driver findElement By id sum input sendKeys WebElement addButton driver findElement By xpath id gettotal button contains class selenium btn addButton click WebElement resultDisplayed driver findElement By id addmessage String result resultDisplayed getText Assert assertEquals result System out println Execution of methodName has ended AfterTest public void tearDown driver quit Console OutputIf there is no priority given for the tests the tests will be executed in alphabetical order Consider the same code used above and we don t provide any priority explicitly In that case you can see the tests executed in alphabetical order Console Output Creating Test Dependency in JUnit and TestNGCreating inter dependent tests is one of the non recommended practices in Selenium However it can be useful when you want to avoid or skip the execution of tests depending on the result of some other tests Creating dependency in JUnit The TestMethodOrder annotation that is used to configure the test execution order is also used for creating test dependencies in JUnit It provides similar functionality that is offered by the FixMethodOrder annotation in the JUnit framework Fixing the execution order is particularly useful when writing functional tests or integration tests It is majorly used in conjunction with TestInstance Lifecycle PER CLASS For controlling the execution order of the test methods test classes or test methods are annotated with the TestMethodOrder annotation The desired order is specified using the MethodOrderer implementation Creating dependency in TestNGIn the below example we have written three tests editProfileTest selectProduct and loginTest The former two tests are dependent on loginTest So when the main test i e loginTest itself fails the dependent tests can be skipped as there is no point in testing when the login functionality is not working package com pages import org TestNG annotations Test public class dependentTest Test dependsOnMethods loginTest public void editProfileTest System out println The user has successfully edited his profile Test dependsOnMethods loginTest public void selectProduct System out println The product has been added into the cart Test public void loginTest System out println The user is successfully logged in Console Output Parallel Test Execution in JUnit and TestNGParallel testing is one of the crucial features to be kept in mind when implementing Selenium test scenarios It has to be utilized from the early stages of testing Parallel execution of tests would highly help in cutting the execution time Now let us run our tests in parallel using JUnit and TestNG We can utilize the LambdaTest cloud Selenium Grid to execute our tests in parallel JUnit Parallel Test ExecutionUntil JUnit the parallel test execution wasn t supported which was the biggest drawback of using the Junit in the automation framework But this was overcome in JUnit Let s understand how to perform parallel testing in JUnit with an example Scenario Verify the login functionality of LambdaTest Selenium playground Step Launch website Step Enter the valid username and password Step Click Login Scenario Verify if the user is able to see the message entered in the form Step Launch website Step On the main page click the Simple Form Demo option Step Once the page is navigated to a simple form enter the message box Step Click the Show Message button Scenario Verify if the user can select the first option in the checkboxStep Launch website Step On the main page click the CheckBox Demo option Step Upon navigation select the first checkbox Step Verify if the first checkbox is selected or not We have three tests to be run in parallel in LambdaTest Selenium Grid Let us now run these tests across different browsers in parallel package ParallelTestsInJnit import org junit jupiter api import org junit jupiter params ParameterizedTest import org junit jupiter params provider Arguments import org junit jupiter params provider MethodSource import org openqa selenium By import org openqa selenium WebElement import org openqa selenium remote DesiredCapabilities import org openqa selenium remote RemoteWebDriver import java net MalformedURLException import java net URL import java util List import java util concurrent TimeUnit import java util stream Stream import static org junit jupiter params provider Arguments arguments public class ParallelTestsInGrid String username YOUR USERNAME Enter your username String accesskey YOUR ACCESSKEY Enter your accesskey static RemoteWebDriver driver null String gridURL hub lambdatest com wd hub String urlToTest BeforeAll public static void start System out println Running junit tests in parallel in LambdaTest Grid has started public void setup String browser System out println Setting up the drivers and browsers DesiredCapabilities capabilities new DesiredCapabilities if browser equals Chrome capabilities setCapability platform Windows To specify the OS capabilities setCapability browserName Chrome To specify the browser capabilities setCapability version To specify the browser capabilities setCapability build ChromeTests To identify the test capabilities setCapability name Parallel JUnitTests else if browser equals Firefox capabilities setCapability browserName Firefox To specify the browser capabilities setCapability version To specify the browser version capabilities setCapability platform Windows To specify the OS capabilities setCapability build FirefoxTests To identify the test capabilities setCapability name Parallel JUnitTests else if browser equals Edge capabilities setCapability browserName MicrosoftEdge capabilities setCapability platform Windows capabilities setCapability version To specify the OS capabilities setCapability build EdgeTests To identify the test capabilities setCapability name Parallel JUnitTests capabilities setCapability network true To enable network logs capabilities setCapability visual true To enable step by step screenshot capabilities setCapability video true To enable video recording capabilities setCapability console true To capture console logs try driver new RemoteWebDriver new URL https username accesskey gridURL capabilities catch MalformedURLException e System out println Invalid grid URL catch Exception e System out println e getMessage ParameterizedTest MethodSource browser DisplayName LoginTest Order public void test String browser setup browser String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started driver get urlToTest driver manage window maximize driver manage timeouts pageLoadTimeout TimeUnit SECONDS List lt WebElement gt elements driver findElements By xpath a class nav link for WebElement e elements if e getText equals Login e click WebElement username driver findElement By id email username sendKeys testuser WebElement password driver findElement By xpath input name password password sendKeys mypassword WebElement loginBtn driver findElement By xpath button id login button loginBtn click System out println Execution of methodName has ended ParameterizedTest MethodSource browser DisplayName FormTest Order public void test String browser setup browser String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started driver get urlToTest driver manage window maximize driver manage timeouts implicitlyWait TimeUnit SECONDS driver findElement By xpath a contains class btn close ck click WebElement element driver findElement By linkText Simple Form Demo element click driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement textBox driver findElement By xpath input id user message textBox sendKeys Hello World WebElement submitBtn driver findElement By id showInput submitBtn click System out println Execution of methodName has ended ParameterizedTest MethodSource browser DisplayName CheckBoxTest Order public void test String browser setup browser String methodName Thread currentThread getStackTrace getMethodName System out println Execution of methodName has been started driver get urlToTest driver manage window maximize driver manage timeouts implicitlyWait TimeUnit SECONDS driver findElement By xpath a contains class btn close ck click WebElement option driver findElement By linkText Checkbox Demo option click driver manage timeouts pageLoadTimeout TimeUnit SECONDS WebElement checkBox driver findElement By xpath input id ex check checkBox click boolean flag checkBox isSelected if flag Assertions fail The checkbox is not selected System out println Execution of methodName has ended static Stream lt Arguments gt browser return Stream of arguments Chrome arguments Firefox arguments Edge AfterEach public void tearDown System out println Quitting the browsers has started driver quit System out println Quitting the browsers has ended AfterAll public static void end System out println Tests ended To run the tests in parallel you can add the below arguments in VM options Djunit jupiter execution parallel enabled true Djunit jupiter execution parallel mode default concurrentConsole Output We will see the tests running in different browsers in parallel upon execution Go to the LambdaTest Automation dashboard you will notice the three builds run in parallel You may also read this article Running JUnit tests in parallel to understand the concept of running the tests in parallel in JUnit in detail TestNG Parallel Test ExecutionParallel test execution in TestNG can be achieved with ease However first you need to define the parallel execution in testng xml lt suite name Parallel Testing parallel methods thread count gt Parallelism can be achieved at the methods classes tests and instances level In addition you can define the number of threads in which the tests have to be executed in parallel Defining the thread count like in the above example will use eight threads for execution When the number of tests or methods is greater the tests will run in a serial manner and wait for the completion of other tests For demonstration we will use the same tests as those in JUnit parallel testing with minor changes for running tests in parallel in TestNG package com pages import org openqa selenium By import org openqa selenium WebElement import org openqa selenium remote DesiredCapabilities import org openqa selenium remote RemoteWebDriver import org TestNG Assert import org TestNG annotations AfterTest import org TestNG annotations BeforeTest import org TestNG annotations Parameters import org TestNG annotations Test import java net MalformedURLException import java net URL import java util List import java util concurrent TimeUnit public class DemoTest String username YOUR USERNAME Enter your username String accesskey YOUR ACCESSKEY Enter your accesskey static RemoteWebDriver driver null String gridURL hub lambdatest com wd hub String urlToTest BeforeTest Parameters browser public void setup String browser System out println Setting up the drivers and browsers DesiredCapabilities capabilities new DesiredCapabilities if browser equals Chrome capabilities setCapability platform Windows To specify the OS capabilities setCapability browserName Chrome To specify the browser capabilities setCapability version To specify the browser capabilities setCapability build ChromeTests To identify the test capabilities setCapability name Parallel JUnitTests else if browser equals Firefox capabilities setCapability browserName Firefox To specify the browser capabilities setCapability version To specify the browser version capabilities setCapability platform Windows To specify the OS capabilities setCapability build FirefoxTests To identify the test capabilities setCapability name Parallel JUnitTests else if browser equals Edge capabilities setCapability browserName MicrosoftEdge capabilities setCapability platform Windows capabilities setCapability version To specify the OS capabilities setCapability build EdgeTests To identify the test capabilities setCapability name Parallel JUnitTests capabilities setCapability network true To enable network logs capabilities setCapability visual true To enable step by step screenshot capabilities setCapability video true To enable video recording capabilities setCapability console true To capture console logs try driver new RemoteWebDriver new URL https username accesskey gridURL capabilities catch MalformedURLException e System out println Invalid grid URL catch Exception e System out println e getMessage Test public void test Code Implementation Test public void test Code Implementation Test public void test Code Implementation AfterTest public void tear driver close TestNG xml lt xml version encoding UTF gt lt DOCTYPE suite SYSTEM gt lt suite name TestSuite parallel tests thread count gt lt test name ChromeBrowserTest gt lt parameter name browser value Chrome gt lt classes gt lt class name com pages DemoTest gt lt class gt lt classes gt lt test gt lt test name FirefoxBrowserTest gt lt parameter name browser value Firefox gt lt classes gt lt class name com pages DemoTest gt lt class gt lt classes gt lt test gt lt test name EdgeBrowserTest gt lt parameter name browser value Edge gt lt classes gt lt class name com pages DemoTest gt lt class gt lt classes gt lt test gt lt suite gt In the TestNG xml file we pass different browsers as parameters for cross browser testing and we use parallel “tests and thread count parameters to run our tests in parallel Console Output Customizing Test Names in JUnit and TestNGThe TestNG framework does not allow for the customization of test names However we can give the tests a customized name in JUnit Customizing the test name in JUnit JUnit provides an annotation DisplayName which aids in customizing the test names for better readability Consider the below class with multiple tests namely DemoTest A DemoTest B and DemoTest C Most of the time the method name wouldn t be easier to depict the actual purpose of the test However in such cases we can use the DisplayName annotation followed by a customized name which would help identify and understand the feature of the test package ParallelTestsInJUnit import org junit jupiter api public class DemoTest BeforeAll public static void start System out println Starting junit tests Test DisplayName Login Test void DemoTest A System out println Thread currentThread getStackTrace getMethodName gt executed successfully Test DisplayName Product Test void DemoTest B System out println Thread currentThread getStackTrace getMethodName gt executed successfully Test DisplayName Home Test void DemoTest C System out println Thread currentThread getStackTrace getMethodName gt executed successfully AfterAll public static void end System out println All the tests are executed successfully The console output shows the tests being named after the customized names given in the DisplayName annotation Console OutputUnfortunately TestNG doesn t support customizing the names of the test Reporting in JUnit and TestNGJUnit doesn t support any built in report But it can be integrated with plugins to generate reports While that s not the case in TestNG it has an inbuilt HTML report generated after the test execution Once the tests are executed by running the TestNG xml file a test output folder will be created which can be found after refreshing the project The report will be named emailable report html Right click the report 🡪Open With 🡪Web Browser The TestNG report would appear to be similar to the one below The TestNG report would appear to be similar to the one below AnotherTestNG report index html can be viewed by right clicking the test output folder 🡪Open With 🡪Web Browser Index html report Choosing the Right framework So far we have debated the various features available in JUnit vs TestNG Choosing the right framework between JUnit vs TestNG has always been a common debate happening over the years Both JUnit and TestNG have been popular unit testing automation frameworks Though JUnit had some drawbacks it has been fixed and has most of the features as TestNG Yet there are some differences between JUnit and TestNG So depending upon the requirement and the features available in these frameworks we have to choose the right framework for automation I hope this comparative study will help you figure out the right automation framework I would love to hear your comments on this article Happy Testing 2022-02-08 14:13:23
海外TECH DEV Community Top 5 programming languages for 2022 https://dev.to/alltimedev/top-5-programming-languages-for-2022-8cg Top programming languages for Top programming languages for In this post I am going to tell you about the best programming languages that you should learn in All the languages that I have taken are from user preference and all the points about all the languages that I am going to mention are taken from Google So if you will like our post and want more posts like this then share our post with your developer friends JavaScriptThe best language on our list is JavaScript The reason why I have included JavaScript is that JavaScript is involving time by time that is a very good thing like its new amazing frameworks are coming every year like React JS VUE JS Angular JS and more then React JS also got improved to Next JS and more things are now also coming in JavaScript like Headless CMS content managers So if we talk about Headless CMS Strapi like headless CMS are coming which already existed in JavaScript for a long time but now there are getting popular and a lot of people are using them and from when Strapi s V has arrived that was super impressive and JavaScript developers also loved it a lot and now people are using it for creating their production applications and if we talk about content managers then SANITY NODE JS MONGO DB like content managers are making a boom in the market and they got integrate with JavaScript very easily and if you want me to create a post on what is Headless CMS and content managers then comment below I will definitely create a post related to it and if you want to know more about JS then I have created a detailed post on it You can visit here for the post PythonThe next choice for programmers in is Python and this year also Python comes under the top list of best programming languages I am saying this because for the last few years Python and JavaScript have both come under the top programming languages including the StackOverflow survey and from my and many other professional developers list also both of them are very capable I am saying this because from Python you can do scripting from Python for web development you can use Django and Flask both of them are best for creating websites and they are so well developed that they are giving competition to both old and new languages and frameworks in the web So if you are a programmer and want a programming language that allows you to create multi platform projects which helps you to create projects faster then I will recommend you use Python To continue reading the post visit 2022-02-08 14:11:53
海外TECH DEV Community Monitor and Debug your Serverless Applications Painlessly with Epsagon https://dev.to/kumo/monitor-and-debug-your-serverless-applications-painlessly-with-epsagon-258o Monitor and Debug your Serverless Applications Painlessly with EpsagonIf you develop Serverless Applications on AWS you know how painful it can be to monitor and debug your application from the AWS Console A few weeks back we at Kumo shared why Epsagon is our favorite solution for monitoring our Serverless Applications after testing most of the Serverless monitoring solutions Epsagon is quick to install has instant alarms great request tracing and enables you to monitor custom KPIs But installing a powerful tool isn t enough You need to set it up the right way and use it frequently The following article will help you stay efficient and well organized while setting up Epsagon for the best monitoring experience TL DR ️For the best setup check the pre flight checklist ️Use the Epsagon Serverless Framework plugin ️Add custom KPIs if desired by calling the Epsagon SDK in you handler ️Setup lambda alarms on an existing and used channel ️Put back together incomplete traces with a custom KPI What is Epsagon Epsagon comes right out of the box with dashboards you can customize to visualize your application s performancealarms you can configure to report errors on your desired channelstraces representing all operations occurring across various services in response of a single trigger This enables you to quickly debug your serverless application custom metrics tailored to your application business and technical KPIs using Epsagon SDKA simple UI provides both an architecture diagram as well as a timeline view of each trace depending on your needs Epsagon pre flight checklist Before starting the Epsagon installation in order to have the best quality of monitoring you should ask yourself the following questions What are my application characterizing identifiers Think user email order idThink technical KPIs such as modelNameWhat data should be kept private Think identification token API keysThink private user dataWhat s my preferred notification channel The tool you already use the most might be ideal to receive notification Nobody likes a never ending pile of automated message on a dedicated and long forgotten Slack channelA tool where you can tag someone or indicate you are taking care of the bug is the bestYou are now ready to install Epsagon You ll have to choose how to install it Lucky for you I have tested all of them and resumed it in the next section Which setup should I use Epsagon gives you different ways of connecting your app to its monitoring solution You can activate auto tracing from the Epsagon App add the Epsagon Serverless Framework plugin to your serverless config or use the Epsagon SDK in all your handlers Pros and ConsAuto TracingServerless Framework pluginEpsagon SDKTimeFastestFastLong SetupCompatibility compatible with Epsagon SDK you can call the Epsagon SDK in your handler compatible with auto traceCustomizationalmost impossiblevery easy in the serverless config but not completecompletely customizableI recommend using the serverless plugin with appropriate parameters Give each stack a specific name Indicate Lambda Functions you don t wish to traceDeclare the sensitive data you don t wish to traceIt is still possible to add a custom metric or a warning inside a Lambda Function with the SDK on a per use case basis Setup with the Serverless Framework pluginThe Serverless Framework plugin enables you to adapt your setup to your trace s Keep in mind these point before the installation It traces all Lambda Functions of your stack immediately after the first deployConfigure stack and function monitoring in your serverless config fileFilter sensitive data on your AWS account before it s shipped to Epsagon backendThis data will not be sent in the trace and you will not see it in the tags anymore Otherwise the data is sent on Epsagon s stack to be accessible on the applist them in ignoredKeys in your configIgnore specific ingoing or outgoing http requestspecify an array of url patterns in urlsToIgnore in your configTrace Step Functions inside a State Machinespecify in the config wrapper stepLambdaWrapper You can now follow the installation instructionFor the best integration you will have to deploy an Epsagon stack on your AWS account Log in to Follow the quick start and click on Monitor Your EnvironmentSelect AWSIntegrate AWS will redirect you to the AWS console where you can deploy the Epsagon stack Adding custom business KPI Since the Epsagon plugin requires the epsagon module you can use the SDK inside your Lambda Function to monitor any KPI you want Here is a snippet as exampleimport epsagon from epsagon const main gt my function handler epsagon label myCustomKPI The plugin will take care of initiating Epsagon and wrapping the handler Similarly you can use setError and setWarning to have an event in the Epsagon App without throwing an error in your code Setting up alarmsTo maintain the quality of your app you need to be notified whenever an error occurs Automatic alerts limit bug impact as we are aware of its presence sooner You can easily set up an alarm on lambdas or on a metric you selectedException refers to Errors thrown by your lambdaFunction Error refers to a Lambda Service errorOut Of Memory refers to a Lambda Function running out of memoryTimeout refers to a Lambda Function reaching its configured timeoutInsight refers to being close to one of the two previous limits Setting up my tracesIn a serverless architecture your operations are often distributed across multiple different services In your AWS console it is painful and time consuming to investigate the origin of a bug Tracing gives you the possibility to quickly understand the context of your error and its timeline You should index the identifiers you selected before starting the installation in order to make them easily searchable throughout your traces data Example Considering an e commerce application you may have some of your EventBridge events containing an orderId attribute Indexing this attribute to make it searchable will allow you to easily recover all traces resulting from any EventBridge events related to a specific order For a simple tag you can add it by clicking the on the rightYou can expand a nested attribute and visualize the entire dataTo tag as searchable a nested property click on Set Searchable Tags and pick the tag you are interested inYou can now create a dashboard an alarm or find a trace with that specific data Setting up a dashboardYou can create graphs and thus dashboards or alarms on types of metrics Epsagon traces they are great for monitoring custom metrics and lambda oriented data trigger data return data CloudWatch metrics these are the same metrics than the ones in CloudWatch but you can easily create a custom graphTo create a good looking changeable dashboard you can create variables These are modifiable at the top of your dashboard You can refer to them in the graphs of your dashboard ️ Beware if an alias is used to specify the region auto complete will be broken→fix pick a region then fill the parameters and finally switch back to alias as region Finally you are almost done In order to ensure your application monitoring is correctly setup you should perform a simple check does all operations across all services resulting from a single trigger appear in one single trace   ️ If you do congrats You can now safely operate your application and react efficiently in the case of a problem   ️ If not you need to “manually assemble traces keep on reading What if it doesn t work What if instead of having a single complete trace you have a cropped one This is of course not an ideal situation but it can happen Some services might not be instrumented yet here is a list of supported services In other cases some API of the AWS SDK itself might be problematic here EventBridge JavaScript SDK v is properly traced but not v In that case you should open an issue or contact the Epsagon team While you wait for an updated Epsagon instrumentation you can implement a contingency strategy You can use custom metrics to log the event Id Here is a code snippet representing this example sendMesage tsimport EventBridge PutEventsCommand from aws sdk client eventbridge import epsagon from epsagon const eventBridge new EventBridge export const handler gt const event await eventBridge send new PutEventsCommand input if event Entries amp amp event Entries EventId epsagon label EventBridgeEntries event Entries EventId eventBridgeWorker tsimport epsagon from epsagon export const heandler async event id string gt epsagon label EventBridgeEntries event id By clicking on the search icon next to the label you can find the all the Lambda Function that consume or emitted the event You can now connect the traces ConclusionIn order to make the most of Epsagon as a monitoring solution I believe you shouldCheck the pre flight checklistuse the Serverless Framework Plugin for EpsagonAdd custom KPIs to monitor your applicationset up alarms to have the shortest lead time when a bug occursuse traces to find the origin of your bugs and be able to reproduce your errorsuse custom metrics to link incomplete traces Finally monitoring your Serverless Application will be painless Don t hesitate to share in the comment section your tips and tricks when using Epsagon Guillaume Duboc is software engineer at Kumo serverless expertise by Theodo 2022-02-08 14:03:45
Apple AppleInsider - Frontpage News Hard-to-find 16-inch MacBook Pro w/ 32GB RAM is $150 to $200 off, in stock https://appleinsider.com/articles/22/02/08/hard-to-find-16-inch-macbook-pro-w-32gb-ram-is-150-to-200-off-in-stock?utm_medium=rss Hard to find inch MacBook Pro w GB RAM is to off in stockSupply shortages continue to plague Apple s inch MacBook Pro but several models with GB of memory are in stock and to off with our exclusive coupon AppleCare is off as well inch MacBook Pro in stockSixty inch MacBook configurations are discounted this week at Apple Authorized Reseller Adorama with this cost saving activation link and promo code APINSIDER But due to supply shortages many models are on backorder for six to eight weeks Luckily there are three configurations in stock with GB of memory and each is eligible for a coupon discount of to off using the instructions below Read more 2022-02-08 14:54:43
Apple AppleInsider - Frontpage News Best deals Feb. 8: $729 75-inch 4K TV, $79 1TB SK Hynix SSD, more! https://appleinsider.com/articles/22/02/08/best-deals-feb-8-729-75-inch-4k-tv-79-1tb-sk-hynix-ssd-more?utm_medium=rss Best deals Feb inch K TV TB SK Hynix SSD more Tuesday s best deals include a inch Vizio M K Smart TV with AirPlay for Super Mario Brothers U Deluxe for Nintendo Switch for and a collection of discounted keyboards Best deals for February As we do every day we ve collected some of the best deals we could find on Apple products tech accessories and other items for the AppleInsider audience If an item is out of stock it may still be able to be ordered for delivery at a later date Read more 2022-02-08 14:00:48
Apple AppleInsider - Frontpage News Apple TV+ scores six Oscar nominations, including Best Picture for "CODA" https://appleinsider.com/articles/22/02/08/apple-tv-scores-six-oscar-nominations-including-best-picture-for-coda?utm_medium=rss Apple TV scores six Oscar nominations including Best Picture for quot CODA quot Apple TV films are in contention for six awards at the th Academy Awards with Oscar nominations for CODA and The Tragedy of Macbeth The Academy of Motion Picture Arts and Sciences has announced the nominees for its th annual Oscars awards Between them CODA and The Tragedy of Macbeth have scored half a dozen nominations across categories ranging from acting to Best Picture Read more 2022-02-08 14:08:17
海外TECH Engadget Amazon's smart thermostat is back on sale for $48 https://www.engadget.com/amazons-smart-thermostat-is-back-on-sale-for-48-145553837.html?src=rss Amazon x s smart thermostat is back on sale for Amazon s budget friendly alternative to Google s Nest thermostats has returned to its all time low price for the first time since December The company s smart thermostat which it debuted last year is percent off and down to As indicated by its low price tag you won t get as many features with Amazon s gadget as you would with something like a Nest thermostat but it s a good place to start if you re building up a smart home on a budget Buy smart thermostat at Amazon The smart thermostat is a sleek square with rounded corners and its minimalist design should help it fit nicely into any home It s built with Honeywell Home Thermostat Technology and it s Energy Star certified so it could save you up to per year on energy costs As with most Amazon devices the smart thermostat works with Alexa ーbut it doesn t have a speaker or a microphone You ll have to use an Alexa device like an Echo speaker or an Echo Show display to control it using voice commands The Alexa mobile app is another option and that s where you ll go to set schedules and change settings while you re out too so you come back to a home with the precise temperature you want That s all there is to Amazon s smart thermostat Google s Nest Thermostat has advanced features like automatically turning the temperature down while you re away but that device will set you back at least Overall Amazon s gadget is a good option for those that only want the basics and have tighter budgets Just make sure to check out the device s compatibility information to ensure that it works with your system before you buy and to know if you need an additional C wire or power adapter kit to hook the thing up Follow EngadgetDeals on Twitter for the latest tech deals and buying advice 2022-02-08 14:55:53
海外TECH Engadget Meta's Oversight Board recommends stricter anti-doxxing policies https://www.engadget.com/meta-oversight-board-doxxing-policy-reform-144104441.html?src=rss Meta x s Oversight Board recommends stricter anti doxxing policiesMeta and its Oversight Board are frequently at odds but this time they re working in concert The Oversight Board has recommended Meta implement stricter anti doxxing policies on Facebook and Instagram after the social media giant requested the Board s advice on sharing private addresses and images Most notably the Board asked Meta to remove an exception letting people share private residence info when it s considered quot publicly available quot That data usually requires effort to obtain from public records according to the Board but its tendency to spread rapidly on social networks significantly increases the potential for real world harm The Board also called for more consistent use of exceptions for newsworthiness a quot quick and effective quot means to request removal of private info and clearer explanations of when sharing partial info such as a city or name is enough to warrant removal The overseer also wanted a special communications channel for doxxing victims more opportunities to provide context for privacy violation reports and opportunities for offenders to delete residential info to have a post restored Privacy violations should be considered quot severe quot the Board added Some of the recommendations were for looser policies External photos of private residences should be allowed when the location is the focus of a news story and people should be allowed to hold protests at publicly owned official residences such as the homes of some national leaders Meta should allow people to share their own residences or for others to publish those locations with consent At the same time though the Board wanted Meta to share privacy violation enforcement data be more specific when notifying offenders and provide more detail on government related requests Provided Meta accepts the choices the moves could do more to discourage doxxing campaigns on Facebook and Instagram In some cases harassers share technically public if realistically unknown and partial info knowing it will be enough to do serious damage While the recommendations might not prevent the most determined doxxers those willing to risk their accounts from sharing addresses they should close loopholes that suggest Meta tolerates this behavior 2022-02-08 14:41:04
海外TECH Engadget What we bought: An $18 lid that makes the Instant Pot actually good at slow cooking https://www.engadget.com/instant-pot-tempered-glass-lid-slow-cooking-review-143053689.html?src=rss What we bought An lid that makes the Instant Pot actually good at slow cookingEvery healthy relationship is built on compromise Which is why there probably isn t room in my boyfriend s apartment for both my slow cooker and Instant Pot Before we met I had been living in my studio for almost eight years plenty of time to accumulate all manner of cooking gadgets tools and appliances I purchased the slow cooker first with a clear sense of what I wanted to make soups chili maybe some bolognese nbsp The Instant Pot on the other hand was an impulse buy I didn t actually know what I would do with this multipurpose cooker marketed as a “ in device But seemingly everyone else was buying one And it was on sale for Black Friday as it always is I paid for the six quart Duo and according to my Amazon order history threw in a inch springform pan and reversible cast iron grill griddle pan I somehow doubt those will make the journey over to my boyfriend s either So of the Duo s seven functions pressure cooking slow cooking rice yogurt steaming sautéing and warming slow cooking was clearly my comfort zone The problem is the Instant Pot is not very good at that at least not out of the box The same sealed lid that makes the IP so adept at pressure cooking rice beans and meat is poorly suited to the task of slow cooking which requires a meaningful amount of evaporation to be successful While there s a steam tray latched to the back of the Instant Pot a traditional slow cooker would have a glass lid with at least one hole for steam to escape What s more the sealed design rules out the possibility of inserting a probe thermometer something all conventional slow cookers offer Read any number of articles or Reddit threads and you ll see two pieces of advice repeat themselves adjust the amount of liquid or increase the cooking time My issue with that approach is that I m not much of an improvisational cook to begin with and I d rather not learn after three plus hours of cooking that my meal is a bust Eventually in my research I found this tempered glass lid made by Instant Pot itself The company isn t so cheeky as to acknowledge the lid improves a flawed slow cooking experience but needless to say it does recommend the accessory for that purpose not to mention sautéing serving and keeping food warm Though I purchased the Duo in Instant Pot claims the six quart lid should fit well any six quart Instant Pot model As a bonus it s dishwasher safe though I definitely hesitated after seeing at least two Amazon reviewers report their wash cycles ended in glass shards Mine survived just fine My first test of the new setup was my favorite slow cooker chili recipe As a tip if you re new to slow cooking in the Instant Pot treat the “Normal setting as the equivalent of low and “More when the recipe calls for high Like any slow cooker the Instant Pot defaults to a warming mode after the cooking time is up After four hours of cooking on low the chili tasted the way I remembered it sweet spicy and certainly not too soupy And I was grateful to not have had to reduce the liquid by to percent especially with so many different kinds of fluids required for this particular recipe Another day I cooked a vegetable tortellini soup on high for five hours This recipe also gave me an excuse to try some sautéing too Over the long hours each recipe was cooking I noticed more and more condensation clinging to the underside of the lid Though the Instant Pot itself got quite warm on low and close to hot on high the handle remained more tepid to the touch which I was able to grab with bare hands without burning myself As a tip if you want to remove the lid without dripping all the condensation back into the dish flip it toward you when removing it instead of lifting it straight up Another tip the lid is also excellent for covering leftovers in the Instant Pot s inner pot Just stick the covered stainless steel bowl in the fridge and worry about cleaning it another day Yes my “tip here is really just punting on doing the dishes In the end I m still not sure what will become of my standalone slow cooker Will I sell it on the cheap Donate it Gift it to my mom who has never used a crock pot TBD But now that my Instant Pot is actually the multipurpose cooker I originally wanted I suspect I won t be bringing that second appliance to the new apartment 2022-02-08 14:30:53
金融 RSS FILE - 日本証券業協会 新型コロナウイルス感染症への証券関係機関等・各証券会社の対応について(リンク集) https://www.jsda.or.jp/shinchaku/coronavirus/link.html 新型コロナウイルス 2022-02-08 15:00:00
金融 金融庁ホームページ クロステクノロジー・ベンチャー・パートナーズ株式会社に対する行政処分について公表しました。 https://www.fsa.go.jp/news/r3/shouken/20220208.html 株式会社 2022-02-08 15:00:00
ニュース BBC News - Home Jacob Rees-Mogg made Brexit opportunities minister as PM reshuffles team https://www.bbc.co.uk/news/uk-politics-60305006?at_medium=RSS&at_campaign=KARANGA brexit 2022-02-08 14:33:16
ニュース BBC News - Home NHS waiting list backlog will take years to clear https://www.bbc.co.uk/news/health-60305502?at_medium=RSS&at_campaign=KARANGA recovery 2022-02-08 14:14:25
ニュース BBC News - Home Oscars 2022: The Power of the Dog leads nominations https://www.bbc.co.uk/news/entertainment-arts-60146616?at_medium=RSS&at_campaign=KARANGA awards 2022-02-08 14:33:42
ニュース BBC News - Home Peloton boss John Foley to step down as firm axes 2,800 jobs https://www.bbc.co.uk/news/business-60301936?at_medium=RSS&at_campaign=KARANGA circle 2022-02-08 14:51:23
ニュース BBC News - Home Mental health support for children 'lacks ambition' https://www.bbc.co.uk/news/education-60304665?at_medium=RSS&at_campaign=KARANGA ambition 2022-02-08 14:21:14
ニュース BBC News - Home West Ham condemn Zouma for hitting pet cat https://www.bbc.co.uk/sport/football/60299426?at_medium=RSS&at_campaign=KARANGA catwest 2022-02-08 14:27:36
北海道 北海道新聞 110番を約440回した疑い 宮城、中学教諭の男逮捕 https://www.hokkaido-np.co.jp/article/643540/ 逮捕 2022-02-08 23:14:00
北海道 北海道新聞 イタリアが混合ダブルスで金 カーリング・8日 https://www.hokkaido-np.co.jp/article/643539/ 混合ダブルス 2022-02-08 23:10:00
北海道 北海道新聞 ベランダから3歳児転落死 沖縄、殺人容疑で10代兄逮捕 https://www.hokkaido-np.co.jp/article/643538/ 市営住宅 2022-02-08 23:09:00
北海道 北海道新聞 高木美帆「1ミリも後悔ない」 北京五輪スケート女子、メダル授与式 https://www.hokkaido-np.co.jp/article/643530/ 北京五輪 2022-02-08 23:04:37

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)