ROBOT |
ロボスタ |
リゾート感満点!ロボユニ「aibo公式かりゆしウェア」数量限定で発売中 「特別なふるまい」「お揃いのプリント柄のマスク」つき |
https://robotstart.info/2022/07/11/aibo-unirobo-kariyushi.html
|
|
2022-07-11 07:46:22 |
IT |
@IT 全フォーラム 最新記事一覧 |
「Windows Terminal Preview 1.15」リリース、新機能「マークモード」と「スクロールマーク」は便利? |
https://atmarkit.itmedia.co.jp/ait/articles/2207/11/news129.html
|
microsoft |
2022-07-11 16:40:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 世界初、ガンプラ入りが登場! 入浴剤「びっくらたまご」20周年を記念して |
https://www.itmedia.co.jp/business/articles/2207/11/news137.html
|
itmedia |
2022-07-11 16:34:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia PC USER] TSUKUMO、Threadripper PROを搭載したハイエンドデスクトップ |
https://www.itmedia.co.jp/pcuser/articles/2207/11/news138.html
|
itmediapcusertsukumo |
2022-07-11 16:24:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] 任天堂、Switchの“熱中症”に注意喚起 「5~35度の場所で使用して」 |
https://www.itmedia.co.jp/news/articles/2207/11/news135.html
|
itmedia |
2022-07-11 16:21:00 |
IT |
情報システムリーダーのためのIT情報専門サイト IT Leaders |
シナモンAI、貨物のケースマーク情報をOCRとAIで照合するシステム「Flax Scanner for Case Mark」を提供 | IT Leaders |
https://it.impress.co.jp/articles/-/23461
|
シナモンAI、貨物のケースマーク情報をOCRとAIで照合するシステム「FlaxScannerforCaseMark」を提供ITLeadersシナモン以下、シナモンAIは年月日、ケースマーク照合システム「FlaxScannerforCaseMark」を発表した。 |
2022-07-11 16:29:00 |
AWS |
AWS Japan Blog |
オープンソースの PACS ソリューション Dicoogle を AWS で実行する (第 1 部) |
https://aws.amazon.com/jp/blogs/news/running-dicoogle-an-open-source-pacs-solution-on-aws-part-1/
|
anopensourcepacssolution |
2022-07-11 07:40:09 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
天狗を見つけるために衛星LiDAR情報から高い木を見つけてみた |
https://qiita.com/yutaka92/items/66e646f6e1b59e705378
|
lidar |
2022-07-11 16:27:22 |
Program |
@IT Coding Edgeフォーラム 最新記事一覧 |
「Windows Terminal Preview 1.15」リリース、新機能「マークモード」と「スクロールマーク」は便利? |
https://atmarkit.itmedia.co.jp/ait/articles/2207/11/news129.html
|
microsoft |
2022-07-11 16:40:00 |
Linux |
CentOSタグが付けられた新着投稿 - Qiita |
VirtualBox上のWebサーバにつながらないときに調べること |
https://qiita.com/itty-star/items/928640871f925b483a4d
|
apache |
2022-07-11 16:18:32 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
バージョン管理に入れるものについて話そうとした時に描いた図 |
https://qiita.com/juno_rmks/items/0701ab43ec4152a1c55a
|
説明 |
2022-07-11 16:03:58 |
技術ブログ |
Developers.IO |
[Rust] Momentoで期限付きhtmlをキャッシュしてみる |
https://dev.classmethod.jp/articles/momento-cache-html/
|
awslambdamomento |
2022-07-11 07:45:17 |
技術ブログ |
Developers.IO |
ทำ Switch Role ง่ายๆด้วย AWS Extend Switch Roles |
https://dev.classmethod.jp/articles/switch-roles-easy-with-aws-extend-switch-roles/
|
ทำSwitch Role ง่ายๆด้วยAWS Extend Switch RolesPain point หลังจากที่ผมใช้งานAWS Switch Role มาระยะนึงแล้วพบว่าปัญหาส่วนใหญ่ที่เจอเมื่อใช้งานก็คือถ้าหากเรามี |
2022-07-11 07:36:18 |
海外TECH |
DEV Community |
DDD is (mostly) superstitious rubbish |
https://dev.to/polterguy/ddd-is-mostly-superstitious-rubbish-hdo
|
DDD is mostly superstitious rubbishDomain Driven Design is one of the most complex things a software developer can learn It s basically a formal ruleset for communication and software development design based upon a non existent language inventing words for fun and redefining the meaning of other words and sentences All in an attempt at pleasing the ego of some senior developer such that he can shine in front of others who don t know the lingo DDD is the result you get when you put high functioning Aspies into the same room all of whom are chemically cleansed of communication skills and social skills and asks them to reinvent the rules for communicationI once had a colleague of mine who almost quit his job because of his senior manager telling him you re not following the rules of DDD in your class hierarchies I wish it was me he had complained about at which point I d answer Sorry I don t have time for DDD I am too busy creating WORKING SOFTWARE DDD is basically the modern priesthood s means to communicate with each other such that they should easily recognise each other and become capable of nodding at each others almost the same way monks and priests have a new speak language to facilitate for communication making them feel special being a part of a secret society of enlightened beings However like all superstition it s mostly rubbish from A to Z Misunderstand me correctly there are a couple of nice ideas in DDD such as bounded context allowing you to declare a vocabulary ensuring people are speaking about the same thing as they are discussing software development problems However for the most parts it s mostly rubbish new speak and you re better off simply leaving it alone I once had a colleague that spent years of his life learning DDD Seriously if you need years to teach yourself how to talk about software and implement software maybe you should rethink your software development tools Just sayin If you want to have software development tools where applying DDD is not even possible in theory to completely eliminate the debate feel free to play around with our Low Code software development platform Link below Create a CRUD app in secondsSorry Sir we can t do DDD because our software development platform doesn t allow us to implement it That ll typically end the debate about DDD |
2022-07-11 07:53:44 |
海外TECH |
DEV Community |
A Serverless Architecture to handle image generation from bulk data |
https://dev.to/mikamai/a-serverless-architecture-to-handle-image-generation-from-bulk-data-ooc
|
A Serverless Architecture to handle image generation from bulk data A real case study on how AWS serverless ecosystem can give your product a lot of value with minimum effortPublications about serverless adoption often miss a practical approach that can make it affordable in real life use case scenarios In Neosperience Cloud Services formerly Mikamai we challenge this pure theoretical adoption of serverless technologies testing our skills in large scale projects that can leverage the full potential of serverless One of the most interesting use cases is our BeatIdentity client Their platform contains thousands of instrumental music tracks offered on an ecommerce platform in different takes A user can select them one by one or as part of a playlist The platform has to create a cover for each track and make clear when it belongs to a single or a playlist Sometimes due to marketing reasons the client may need a cover image with the BeatIdentity logo as a watermark Since doing this task manually is extremely time consuming and stressful for content creators we supported the company in building the BeatId Generator Thanks to the work of the Neosperience design team along with the customer we created a tool using Processing to procedurally generate the cover image from track details such as title artist instruments whether it is part of a playlist or needs the logo A sample of the resulting images is as follows either with a standalone song the pink images or a playlist the purple images This core logic needs to be packaged within a service capable of storing the images in a way they could be easily retrieved in the future by third party applications e g the ecommerce platform or by BeatIdentity employees Infrequent and unpredictable access patterns as well as maintenance considerations suggest this could be built as a cloud native application leveraging all the benefits coming from serverless Project OverviewThe application should support the following use cases A general user can get an already generated cover in high resolution or in a custom defined size A third party application can upload a single track letting the system generate the high resolution versions of the cover A BeatIdentity Admin can import a single track or massively import multiple tracks uploading a CSV file At the end of the CSV import process the user can download a zip archive containing all the generated files The AWS Cloud Development Kit CDK lets define the AWS cloud infrastructure in a general purpose programming language Among the several available ones we chose Typescript to take advantage of the benefits this programming language serves Instead of writing the resulting Cloud Formation Stacks using the native JSON or YAML format Typescript makes infrastructure design deployment and the overall coding experience more enjoyable even allowing good practices such as code reviews unit tests and source control to make the infrastructure more robust The overall architecture implementing the beforehand use cases leverages the following AWS services Lambda it s the core of our serverless application since it allows us to run the code without caring about provisioning or managing servers and only pay per use Amazon API Gateway it sits in front of our lambdas exposing them as REST APIs and taking care of authentication Amazon Cognito this takes care of authenticating our users Amazon S as a storage service it helps us to manage data in every format we will need storing them as objects in Buckets AWS SQS it s a queue service and we use it as a decoupling mechanism to avoid losing messages Amazon DynamoDB the fully managed NoSQL service offered by AWS We use it to persist generation info and let users and third parties know the status of each of their imports Amazon CloudFront simply put it s a CDN fully integrated with the AWS ecosystem We use it for caching and for generating resized covers on the fly AWS Code Pipeline and AWS Code Build to take advantage of the CI CD approach in order to automatically build and deploy our code We need to store on Amazon S different sets of data thus we defined four buckets starting from the access patterns CSV Bucket used for uploading the CSVs via presigned URLs Track Bucket used for storing the track metadata This bucket has no public access and is used only by the lambdas to write and read them Image Bucket this bucket is served by Cloudfront and contains the generated cover and the zip archives Frontend Bucket for storing the frontend web application written in React The bucket assets are then served by Cloudfront Using multiple buckets instead of just one bucket for everything makes our life easier for handling permissions and reduces the chance of human error The Cover Generation LambdaThe Lambda which translates the Processing algorithm must reproduce all the expected behaviors such as receiving track details generating some variables and colors drawing shapes and applying stickers if needed All the Processing APIs used by the algorithm were available as part of the Canvas API So we decided to convert the Processing code in Typescript and use the node canvas package to reproduce the same behavior This package needs some native libraries which can be easily provisioned on the Lambda function via an existing AWS Lambda Layer Once we were able to replicate the algorithm result making it work as a Lambda function was the easiest part we just needed to slightly change our function definition to adhere to the lambda event specification The function would need to access several static assets which would make the deploy artifact bigger We could have used S for them but this would result in a lot of unnecessary API requests so we moved these assets in a Lambda Layer too Having the cover generation lambda complete the rest of the product was already appearing as an easy task We divided the rest of this serverless architecture into three main parts described in the following paragraphs Single Track CreationThe simplest flow is the Single Track Image Creation The flow is thought to be used by a third party user and the BeatIdentity admin There are two APIs that need to be called by third party services They are implemented as Lambda Functions and exposed via API Gateway and authenticated against an API Key Calling the “Create Single Track API will insert the corresponding record in DynamoDB save the JSON details in the JSON Bucket and start the Step Function workflow which is async This way the HTTP request is not blocked by the cover generation and the user can know if the generation is complete by calling the Status API which fetches the status from the corresponding record on DynamoDB The state machine provided by the AWS Step function allows us to perform all the tasks needed to call the “Cover Generation Lambda keep the corresponding record on DynamoDB updated and handle errors CSV UploadThe aim of the second flow is to allow BeatIdentity admins to massively import hundreds of tracks at the same time uploading a CSV in which each row represents a track At the very start of the flow the frontend application calls the “Presigned URL API to obtain a presigned URL which allows uploading the CSV on the S This technique guarantees a secure way of Keeping the CSV bucket private Offloading the file from our service to S reducing the overhead of receiving the file on the backend and then uploading it from the backend onto S More info on this topic can be found here When the upload on S is complete a message is propagated to a SQS Queue and consumed by a Lambda Function Start State Machine which is responsible for starting the Step Function responsible of processing the CSV a Step Function cannot be started directly from an SQS queue If any error occurs a message will be requeued and if the error persists after some time it will be archived in a DLQ queue for further analysis The Step Function of this flow is slightly different with respect to the previous one since it needs to create images from each CSV row as fast as possible Thus the iterator operator was implemented to perform the actions in parallel and to process rows in groups of elements for each iteration At the end of the generation a zip archive is created containing all the generated Covers and stored in the Image Bucket to be later downloaded Cover RequestUntil this point each generated image can be fetched in its high resolution size But someone may also need scaled down versions To allow this we implemented a common pattern through Lambda Edge When a cover image is requested to Cloudfront its path starts with “ covers the request is sent to S to retrieve an object from there The S response is then handled by a Lambda Edge which is a special Lambda acting as a middleware If the S response is a “Not Found Object and the requested path is referring to a cover image the Lambda Edge will fetch the high resolution image from S size it down to the desired dimension store it on S and return the image content This way on the next request for the same object S would return the resized version and the Lambda would just ignore the message This pattern is explained in detail here What we got at the end of the dayWe could have delivered this product in a plain classic way a simple server configured with Java and Processing and a couple of PHP web pages The user would have used the web pages to let PHP handle the Processing sketch and generated the images maybe storing them on the EC EBS itself This would have reduced slightly the development time but at what cost Scaling is not obvious and needs some additional work Security is not by default An EC server needs additional work on this point too The instance needs periodic updates The infrastructure has fixed costs even if we don t use the platform Instead we decided to aim for a fully serverless architecture The cover generation lambda and the resize lambda edge function complete their work in about seconds which means that generating covers for MILLION tracks will cost which is slightly less than paying a ta large EC instance We don t have to take care of infrastructure security at the same level of classic infrastructures we just need to ensure the correct permissions are set and that our code is not faulty We have built in decoupling between the different components which means changing a peace of our design is pretty easy Thanks to CDK we have a single repository put in CI CD which contains both our infrastructure and application logic in a homogeneous language making it easy to understand how data is flowing Overall the final result exceeded the client expectations and the effort required to both translate the original generation algorithm to a different language and to develop the product with a serverless approach required the same time we would have needed to provision and properly configure a classic infrastructure Looking at the repository it s easy to see which components do what in our architecture because the stack code appears as an imperative function of code composing pieces together and adding behaviors For example we create a csvBucket then we create a “CSVGenerationFSM which is a construct for our step function then we do “fsm bindToSBucket csvBucket to imply that our step function will start when an event is triggered on the csv bucket So our advice is don t be afraid of the serverless world and don t play safe Just start playing with it and look at some other architectural examples like the one we talked about in this post to get inspiration for improving your design more and more Some advice for the beginners The AWS world aims for security over all If you have a bucket and a lambda you have to explicitly give permission to the lambda to write or read on that bucket and you can also scope this permission to specific objects or prefixes This applies to any AWS service and to any action you make on them So even if it may seem complicated when you start once you ll get used to it you ll discover your products have never been so robust and secure It s not you that are not good at googling for documentation This is indeed one the few things on which AWS could improve And they are doing it because if you look at the CDK documentation it s awesome Co Authored with Antonio Riccio |
2022-07-11 07:30:44 |
海外TECH |
DEV Community |
Java New String Methods – From Java 8 To Java 17 |
https://dev.to/pramodbablad/java-new-string-methods-from-java-8-to-java-17-5ea1
|
Java New String Methods From Java To Java Strings are the most used data type in Java Almost every application in Java makes use of strings That s why strings are treated with special attention in Java From time to time new methods are added to String class so that working with strings becomes effortless and simple join in Java chars and codePoints in Java isBlank lines repeat strip stripLeading and stripTrailing in Java indent transform describeConstable and resolveConstantDesc in Java formatted stripIndent and translateEscapes in Java are some new Java string methods See more at |
2022-07-11 07:30:13 |
海外TECH |
DEV Community |
4 ways of calling an API in Javascript. |
https://dev.to/talenttinaapi/4-ways-of-calling-an-api-in-javascript-27ma
|
ways of calling an API in Javascript Which one do you think is the best |
2022-07-11 07:28:18 |
海外TECH |
DEV Community |
Benefits of using JMeter for Performance Testing |
https://dev.to/bethwilsonuk/benefits-of-using-jmeter-for-performance-testing-3bnl
|
Benefits of using JMeter for Performance TestingA wide range of performance testing capabilities is offered by Apache JMeter which is an open source testing tool It is a Java based desktop application through which testing of client server applications like web services websites FTP servers databases are carried out Upon that there are no licensing costs involved TCP servers Shell scripts LDAP servers FTP servers and Database servers are some of the common types of applications that can be tested using JMeter In this article you will get to know the benefits of using JMeter for performance testing What is Apache JMeter It is an open source software used to measure performance and load test functional behavior It is a pure Java application that was designed originally to test Web applications and eventually expanded to other test functions The performance can be tested on static and dynamic resources JMeter can be used to simulate a network group of servers a server or object to test its strength so that the overall performance can be analyzed under different load types JMeter can easily execute load testing functional testing and performance testing Performance testing is conducted on different types of applications such as shell scripts databases LDAP web services and web applications JMeter supports other non functional tests such as Distributed testing Web service testing and Stress testing What is Performance testing It is a testing method that makes sure that a specific software product or application works fine under an expected workload The application s performance is ascertained in terms of stability reactivity and sensibility under a particular workload The software product or application s capability and quality are analyzed through this testing process The amount of load a software product can handle and also whether the software product is able to respond rapidly is ascertained The objective of performance testing includes evaluating command response times workload efficiency memory utilization maximum concurrent users network bandwidth usage data transfer velocity processing speed and application output The performance bottlenecks in the software application are identified and eliminated It is also known as “Perf Testing Following are the five benefits of using JMeter for performance testing Valuable community support As JMeter is open source software it will be a wise move to reach out to the community to get help on test initiatives The implementation process can also be understood through a large number of tutorials that are available online There are many plugins available free of cost and thus these plugins can be used to speed up the process of script analysis and creation Server compatibility JMeter can handle load and performance testing for different products regardless of the protocol or server being used It can be NoSQL MongoDB JMS LDAP FTP database HTTP or HTTPS web services A well defined and structured architecture Those who use JMeter are quite familiar when it comes to creating plugins around JMeter All the specific capabilities are offered that are in line with working on reporting goals especially server resource monitoring and other key features If the plugins need to be written by the user then it is considered to be quite convenient The value of customizations if additional capabilities of JMeter need to be harnessed by the developer then the platform of open source can be used to customize its source code and thus create based on the specific requirements The benefit of record and Playback Through drag and drop Users can use JMeter to take the advantage of record and playback feature so that test scripts can be created by users more quickly while eradicating any latencies Conclusion If you are looking forward to implementing performance testing using JMeter for your specific project then do get connected with a well established software testing services company that will provide you with a methodical testing strategy that is in line with your project specific requirements About the author I am a technical content writer focused on writing technology specific articles I strive to provide well researched information on the leading market savvy technologies |
2022-07-11 07:24:10 |
海外TECH |
DEV Community |
Install Bun for Windows: A Modern JavaScript Runtime Like Node or Deno |
https://dev.to/openhacking/install-bun-for-windows-a-modern-javascript-runtime-like-node-or-deno-449e
|
Install Bun for Windows A Modern JavaScript Runtime Like Node or Deno IntroductionRecently a project called Bun in the front end tool chain has become popular Bun is a new JavaScript runtime with built in bundler transpiler task runner and npm client Bun is a modern JavaScript runtime like Node or Deno Unlike Nodejs Bun extends jsCore not V Bun natively implements hundreds of Node js and Web APIs including of Node API functions native modules fs path Buffer and more The goal of Bun is to run most of the worlds JavaScript outside of browsers bringing performance and complexity enhancements to your future infrastructure as well as developer productivity through better simpler tooling I plan to try installing Bun on Windows to experience it Environment PreparationInstall WSLThe official website provides a one click installation script but it can only run on Linux macOS and WSL The Windows desktop environment cannot be installed so if you want to install on Windows you need to install the Linux subsystem which is WSL For specific steps please refer to Microsoft s official documentation Install Linux on Windows with WSLIt is recommended to use Windows Terminal to quickly open the WSL terminal Microsoft Store Windows TerminalMake sure the BIOS virtual machine function is turned onEnter the BIOS to set the virtualization technology Intel Virtual Technology disabled by Disable to Enable enabled Enable Hyper vPowerShell or CMD exe run in administrator modebcdedit set hypervisorlaunchtype autoFor the details of virtual machine and Hyper v settings you can also refer to this blog post VMware Workstation Unrecoverable Error vcpu Troubleshooting for Vmware Workstation Install BunMake sure that the WSL system mine is Ubuntu has unzip installed otherwise an error will be reported when installing Bunerror unzip is required to install Bun see unzip is requiredUse Terminal to open WSL Ubuntu system install unzip with the following commandsudo apt get install unzipEnter under WSL curl bashThe following prompt appears the installation is successfulBun was installed successfully to root bun bin bunManually add the directory to your HOME bashrc or similar BUN INSTALL root bun PATH BUN INSTALL bin PATH Manually add environment variables as promptedOpen the bashrc file with vimvim root bashrcAdd the following environment variable settings to the end of the bashrc file and save itBUN INSTALL root bun PATH BUN INSTALL bin PATH Exit and re enter WSL to check if the installation is successfulbun hTest ModuleUse the WSL extension for vscode to manage projects in a WSL systemOfficial detailed tutorial Get started using VSCode with WSLWe create a new http js file and write the code http jsexport default port fetch request return new Response Welcome to Bun start http servicebun run http jsVisit http localhost to see the Welcome to Bun message indicating that the operation is successful The official website also provides more cases to try Bun Examples ConclusionAfter experience the use of this tool needs to be improved especially for Windows users it is not easy to install it is best to provide a Windows installation package It is currently only a beta version which can be used for learning There may still be a long way to go before it can be used in production After all Node js has been well known by front end development and the ecology of Deno is still being established There is still a long way to go ReferenceInstall Bun for Windows A Modern JavaScript Runtime Like Node or Deno VMware Workstation Unrecoverable Error vcpu Troubleshooting for Vmware WorkstationBun |
2022-07-11 07:12:35 |
海外TECH |
DEV Community |
Strangler pattern approach to migrating applications - pros and cons |
https://dev.to/accesto/strangler-pattern-approach-to-migrating-applications-pros-and-cons-40fk
|
Strangler pattern approach to migrating applications pros and consThe strangler pattern is a common approach to rewriting modernizing and migrating existing legacy software to a new approach solution implementation We already covered some topics related with it in the past Mentioned it as one of the alternatives for system rewriting and described a case study migration in one of our projects But it seems that strangler pattern is gaining more and more visibility in recent years and this is not a surprise for us Strangler pattern comes with a good set of pros that it brings to a project Also the toolset that are now available to developers allow to easily perform this kind of migrations on living systems Let s take a deeper look at some basics and the pros and cons that arise from them Strangler pattern approachLet s focus on the very basics first What does the strangler pattern mean Well in this pattern we start with a legacy system that we need to rewrite modernize or migrate to something newer Quite often such legacy systems use some outdated technologies frameworks libraries and their overall complexity makes it very hard or even impossible to refactor the code bit by bit Our first step with the strangler pattern is to put an intermediary facade in front of the old system In that case all requests need to go through the facade before they reach the legacy system As a next step we decide what part of the system what service we would like to migrate Let s assume we work on an e commerce system We could decide to migrate the home page first In that case we write this part of the system from scratch using a greenfield approach You can choose the tech stack the architecture everything There are no major constrains In our case we usually decide to use Symfony and an event driven architecture The new system is built next to the old system When the team is finished with the development and the new code is tested we can adjust the facade and move the traffic for home page from our old system to our new service Following this approach we can migrate the legacy application part by part There is no need to work with the legacy code all new features can be implemented in the new system You maintain the old application and at the same time add functionality to the new system By following the strangler pattern approach you can pay back the technical debt and add new features at the same time Eventually the new architecture will be completely replacing old code Pros and cons of strangler pattern implementation ProsMinimize risk of migration by splitting the migration process into smaller separated chunks of work Divide and conquer Allows to quickly deliver business value and achieve visible results rewriting a small subset of features takes significantly less than rewriting the whole system Has no major constraints regarding the software architecture and technology behind the new system In most cases the development effort required to rewrite the entire application is lower than in other approachesEasy to implement and understand The code complexity is rather low Works well even when refactoring a complex system Allows to implement microservices architecture and split the work between multiple development teams But as there are no constraints on the software architecture you can also apply it to a monolithic application ConsRequires a lot of attention to the boundaries between old and new parts Connection points data exchange etc As a result of the above might require to write lots of Adapters It is quite easy to break some best practices and end with a dependency hell Sometimes rollback scenarios might be hard to implement and you obviously should have them When implemented wrongly the parts might become tightly coupled SummaryAs always using a software pattern comes with some consequences You literally exchange one problem for another one There are no silver bullets but by knowing different approaches you can decide on what problems mean less risk for you In case of strangler pattern you exchange the huge risk of rewriting a legacy monolithic application into smaller less risky changes You iterate faster in a more agile way There are obviously some consequences that arise and you should be aware of but smaller failures are always easier to fix and that s what the Strangler fig pattern offers you |
2022-07-11 07:10:27 |
海外TECH |
DEV Community |
Set up your test automation project in Playwright using Typescript |
https://dev.to/ndenic/set-up-your-test-automation-project-in-playwright-using-typescript-21jf
|
Set up your test automation project in Playwright using TypescriptPlaywright is a powerful framework which provides cross browser automation through a single API but this post is not entirely about it but about how to set up a project in a good way I will use Playwright for this purposeWhat you will not find in this post is an initial level explanation of the playwright framework I think there is already a lot about it on the internet This is pure practice something that will serve you well if you are the first to break the ice in terms of setting up a project You started working on a new project or an old one and a request came or you decided to use Playwright yourself It s ok to start writing tests just after you install playwright But in fact this kind of start will affect your later more complex tests where your code will be difficult to maintain and even more difficult to add new tests I will try to make this part easier for you and to help you set good roots at the very beginning What you will learn from this post is Project setup starts with a good folder structureWhich design pattern is good for that purposeA step by step explanation of what you need so that you can just write the tests afterwards without a headache Warm upIf you haven t written a single basic test or at least spent a few hours in this framework I suggest you visit their official site and look around a bit and write some tests It s not difficult and believe me if you deal with test automation at work you will like this I have been using this framework for a year or so I can tell you that the transition from Selenium Java to Playwright TypeScript was not the best I m not saying it was difficult but I wasn t the happiest at that moment But we won t talk about that now I efficiently use that tool to finish all the work with quality and speed So in this post we are working with Playwright using Typescript These are some general things and can be applied with different tools and it s not related only to the playwright Blasting offWe will start with setting up the project Of course we need nodejs We will create an empty directory for example pw test automation and after that we will open an IDE some code editor I use VSCode for this purpose so I will show an example using that code editorThen we will need to open terminal and donpm initAfter that we will add the dependencies that are basic for our work which is only Playwright You can add everything else as you wish test runners or any other dependencies So next things arenpm i D playwright testnpm i D playwright After we have successfully installed the dependencies we will see the versions of the playwright in the package json file Design patternOk let s move on to something more serious We will use what some call the Business Layer Page Object Pattern where the tests will have a clear structure of what is happening there So we don t catch the selectors in tests we don t go through the lists but we call the functions that contain it and which are named enough that someone who doesn t have that much knowledge in that area can understand what s happening there Don t worry it will become clearer to you soon if it hasn t already This is my way of implementing this design pattern and it works well for me Let s create inside pw test automation folder root folder services folder then inside we will create two more pages and stepsWe need one more folder inside the root folder and that stests Where we will create our test files Config filesWe will quickly create a tsconfig json file in root folder to use better the TS features and avoid some JS syntax errors which will appear without config file Those are just some basic compilerOptions but of course you can expand it Next we ll create a playwright config file so we can configure our tests to run the way we want And of course we have the possibility to expand if the project requires it Here we have some simple things configured As u can see for key baseURL we just added URL but in real projects we wont have one environment this means that we will have to change the URL as soon as we want to run our tests on another environment Now let s change that so that we can change the environment based on the entered input parameters I have created one more JSON file which is for environments and it contains two keys One key is prod other is dev But that s all up to you and your project It depends which environments you got and how are they called Okay we added process environment variable ENV so how to specify that and when Next step we should open package json and change scripts gt test scripts test ENV npm config ENV playwright test Now we just set that if in the future we wanted to run a test based on some environment we would type for example npm run test ENV prod or dev in our case At the moment we don t have a single test so we have nothing to run but no rush When setting up a project you have to do it thoroughly and think many steps ahead Now let s do it again as for the environment but this time we need to run the tests by tags as well For example run all regression testsAnd then update also test script in package JSON file with latest changes scripts test ENV npm config ENV TAGS npm config TAGS playwright test Ok I think you get the point A lot of things can be configured this way I ll give you a hint for further options what if we want to run by browser type I didn t spend time explaining to you what each key in the config file means individually because I think there is no better explanation than the documentation itself SelectorsLet s go to the next section We will need to store selectors somewhere My advice is to have separate file for that purpose There are many options gt create only one selectors json file or have folder selectors which contains json files for each Page I prefer first option because we have enough freedom to create nested JSON object and store selectors in similar way as to create N amount of files ServicesNow we have the selectors we have the config file we have the basic structure according to the Business Layer Page Object Pattern and we are starting to create for example the HomePage The point is that here we use the selectors that we saved in the json file later in the functions and return them as a Locator object that we can work with Let s create steps for HomePageNow you can already understand that we will only call those steps in the test files This is just an example and in reality we will have a lot of steps functions here Test dataAnd now you will definitely need Test data so for example you pass some data to the function with which you want to testFor this purpose my suggestion is to create a test data folder in the root folder and create as many json or any other type files with test data as you need As you can see the project setup seems almost complete Everything is clearly separated into units But of course CI CD integration is also needed here which is not difficult at all but it takes this story to the other side I ll leave that up to you and I ll be there to help you if you need it of course don t hesitate to ask a question It s not over yet hold on The last thing in that magic circle of POM model is the Test file So we created a folder in the start for that purpose gt tests In that folder we will create for example the home page tests spec ts fileIn the test file in this case we have beforeEach but don t pay attention to that now because it could also be beforeAll and in that case it would be desirable to have afterEach or afterAll as well We initialize the page in the before method so that we can pass it to the constructor of the steps class We do not use the HomePage functions in tests unless there is an overwhelming need for it and in some cases it is unavoidable We already used only Steps functions that do all the work For example we have inputTextWithTestData and after that we add a function for assertion in steps and name it appropriately What do we get with this kind of structure Easier maintenance of tests more precisely steps Code redundancy is avoided we don t have to repeat ourselves we can use the same step in several test cases if there is a need for it Do you need more At the end of the day someone who doesn t understand the code that much will understand what the test is about You get an almost Gherkin like syntax if you look at the before method as GIVEN and the rest of the action WHEN insertInputTextWithTestData THEN assertionSo let me repeat the most importantService folder contains Page and StepsPage functions are functions that return Locators or Promises lt gt that we solve later We use those functions in the Steps class The Steps class literally contains the steps that we will do in the test files to execute a test case add a book to the cart open the cart confirm that the book is in the cart We don t want it all to be in one function but several smaller ones so that they can be used again if we need to perform the same actions again and also so that the name of the function itself is short and clear In the test file we initialize page and steps write test and call functions from the steps class And let the game begin SummaryThis is how it might look in the end I added the pipeline YML file jenkinsfile and the helper classNow you can start writing your ee UI tests or eventually expand that framework by your project needs And yeah finally this would be an example of how we will run the testsnpm run test ENV dev TAGS regressionbut we will probably have more parameters to manage what and how we will run in our tests Thanks for reading I hope this will help you if you find yourself in the situation of setting up a project from scratch and of course shoot your questions if you have any |
2022-07-11 07:04:35 |
海外TECH |
DEV Community |
Try Best-Rate-Swap Feature on Your Web3.0 Site |
https://dev.to/arkenfinance/try-best-rate-swap-feature-on-your-web30-site-3b1k
|
Try Best Rate Swap Feature on Your Web SiteToday I d like to show you how to implement the Arken widget on your site giving a seamless swapping experience for token holders in a few lines of code lt html gt lt head gt lt head gt lt body gt lt div id arken root data chain bsc data mode dark data theme color data theme text color data base token address data quote token address data external top token address data custom image token data widget type data graph range data max width px data height data background color light data background color dark gt lt div gt lt script async src gt lt script gt lt body gt lt html gt Arken Finance aims to contribute to and work on ambitious initiatives and to advance the DeFi sector for the benefit of everyone We want to see our fellow DeFi projects providing easy and simple user experiences to your users too Thus you can now get Arken s charts and swapbox widget to integrate it directly on your website at no cost Our widget is simple beautiful and customizable giving a seamless swapping experience to your users Here are the steps Or Try It Yourself here How to Get Arken s WIDGET on Your SiteStep Go to Arken s Widget Customization Dashboard Step Customize the display type of the widget There are options available Graph Only Swapbox Only and Graph and Swapbox Select the widget type and the default graph range that you prefer You can also adjust the width and height of the widget to fit your site Step Select default tokens Click on the Swap bar at the top Choose the network of your token Then select the default quote token and default base token by typing the token name or inserting the token contract address and clicking the add item option You can also use the custom image by pasting the image URL directly into the CUSTOM IMAGE URL box Step Style your widget Go to the Style bar and customize the theme light or dark and color scheme that you want Step Click the Get Code button Step sets of codes are available in HTML and React Now you can use the codes for your landing page or designated place Now you are all set Keen to join our community Visit Discord Twitter Telegram Facebook |
2022-07-11 07:04:35 |
医療系 |
医療介護 CBnews |
接種会場への看護師の労働者派遣は9月30日まで-厚労省が事務連絡、10月以降の体制検討を |
https://www.cbnews.jp/news/entry/20220711161503
|
予防接種 |
2022-07-11 16:20:00 |
金融 |
RSS FILE - 日本証券業協会 |
インターネット取引に係るシステム障害件数 |
https://www.jsda.or.jp/shiryoshitsu/toukei/inter/index.html
|
取引 |
2022-07-11 09:00:00 |
金融 |
ニッセイ基礎研究所 |
パワーカップル世帯の動向-コロナ禍でも増加、夫の年収1500万円以上でも妻の過半数は就労 |
https://www.nli-research.co.jp/topics_detail1/id=71730?site=nli
|
パワーカップル世帯の動向ーコロナ禍でも増加、夫の年収万円以上でも妻の過半数は就労目次ーはじめに新型コロナ禍で収入が減少する労働者もいる中でパワーカップルはー世帯の所得分布の全体像千万円以上の高所得世帯は、・歳代や大都市で多いーパワーカップル世帯の動向コロナ禍でも増加、夫の年収万円以上でも妻の過半数は就労共働き夫婦の年収分布高収入の妻ほど高収入の夫、ただし扶養控除枠を意識する妻もパワーカップル世帯数の推移コロナ禍でも引き続き増加、年で万世帯、共働き世帯の夫の収入別に見た妻の就労状況夫の年収が万円以上でも妻の過半数は就労ーおわりに遠回りに見えるが就労環境の整備こそ有効な消費喚起策※本稿は年月日発行「基礎研レポート」を加筆・修正したものである。 |
2022-07-11 16:13:02 |
金融 |
日本銀行:RSS |
日本銀行当座預金のマクロ加算残高にかかる基準比率の見直しについて |
http://www.boj.or.jp/announcements/release_2022/rel220711a.pdf
|
当座預金 |
2022-07-11 17:00:00 |
金融 |
日本銀行:RSS |
CPMI報告書「決済システムのインターリンクとAPIが担う役割:クロスボーダー送金のための枠組み」の公表 |
http://www.boj.or.jp/announcements/release_2022/rel220711c.htm
|
送金 |
2022-07-11 17:00:00 |
金融 |
日本銀行:RSS |
「決済の未来フォーラム クロスボーダー送金分科会(5月23日)」の議事概要 |
http://www.boj.or.jp/announcements/release_2022/rel220711b.htm
|
送金 |
2022-07-11 17:00:00 |
海外ニュース |
Japan Times latest articles |
Women win record 35 of 125 seats in Japan’s Upper House election |
https://www.japantimes.co.jp/news/2022/07/11/national/politics-diplomacy/female-winners-upper-house/
|
chamber |
2022-07-11 16:10:41 |
海外ニュース |
Japan Times latest articles |
Mazda’s decarbonization drive faces rough road ahead |
https://www.japantimes.co.jp/news/2022/07/11/business/mazda-decarbonization-drive/
|
Mazda s decarbonization drive faces rough road aheadSecuring sufficient electricity supplies is complicating the firm s goal of achieving net zero at its plants by while the carmaker is also not willing to |
2022-07-11 16:10:18 |
ニュース |
BBC News - Home |
Heathrow Airport warns more flight cancellations possible |
https://www.bbc.co.uk/news/business-62119420?at_medium=RSS&at_campaign=KARANGA
|
disruption |
2022-07-11 07:53:34 |
ニュース |
BBC News - Home |
Birmingham airport flights delayed longest in 2021 |
https://www.bbc.co.uk/news/business-62112211?at_medium=RSS&at_campaign=KARANGA
|
covid |
2022-07-11 07:51:13 |
ニュース |
BBC News - Home |
Australia v England: Sam Underhill ruled out of decider |
https://www.bbc.co.uk/sport/rugby-union/62118470?at_medium=RSS&at_campaign=KARANGA
|
australia |
2022-07-11 07:44:35 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
【寄稿】安倍晋三が発案した「インド太平洋」 - WSJ発 |
https://diamond.jp/articles/-/306293
|
安倍晋三 |
2022-07-11 16:04:00 |
北海道 |
北海道新聞 |
マスターズ、27年開催決定 新型コロナで大幅延期 |
https://www.hokkaido-np.co.jp/article/704325/
|
世界大会 |
2022-07-11 16:48:00 |
北海道 |
北海道新聞 |
嵐ヨシユキさんが死去 「横浜銀蝿」リーダー |
https://www.hokkaido-np.co.jp/article/704315/
|
highschoolrocknroll |
2022-07-11 16:34:51 |
北海道 |
北海道新聞 |
ヤクルト村上「中心に僕がいる」 コロナ感染で主力が大量離脱 |
https://www.hokkaido-np.co.jp/article/704322/
|
新型コロナウイルス |
2022-07-11 16:40:00 |
北海道 |
北海道新聞 |
<横田教授の「コロナ」チェック>札幌中心に続く増加傾向 基本的な対策再度徹底を |
https://www.hokkaido-np.co.jp/article/704317/
|
増加傾向 |
2022-07-11 16:39:52 |
北海道 |
北海道新聞 |
北海道内602人感染 1人死亡 新型コロナ |
https://www.hokkaido-np.co.jp/article/704297/
|
北海道内 |
2022-07-11 16:35:26 |
北海道 |
北海道新聞 |
道南で27人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/704319/
|
道南 |
2022-07-11 16:32:00 |
北海道 |
北海道新聞 |
首相、憲法改正の実現に意欲 「安倍氏の思い受け継ぐ」 |
https://www.hokkaido-np.co.jp/article/704304/
|
岸田文雄 |
2022-07-11 16:14:29 |
北海道 |
北海道新聞 |
安倍氏のユーチューブ登録者急増 100万人超 |
https://www.hokkaido-np.co.jp/article/704296/
|
安倍晋三 |
2022-07-11 16:22:03 |
北海道 |
北海道新聞 |
ラニーニャ現象、秋まで継続か 9月まで厳しい暑さに |
https://www.hokkaido-np.co.jp/article/704314/
|
継続 |
2022-07-11 16:19:00 |
北海道 |
北海道新聞 |
選手間投票、日本ハムから松本剛選出 プロ野球オールスター |
https://www.hokkaido-np.co.jp/article/704308/
|
日本ハム |
2022-07-11 16:17:10 |
北海道 |
北海道新聞 |
警視庁が警察犬慰霊祭 追跡や捜索に貢献 |
https://www.hokkaido-np.co.jp/article/704307/
|
行方不明者 |
2022-07-11 16:09:00 |
ニュース |
Newsweek |
ロシア対ウクライナ戦況 東部ルハンスク州の攻防、米提供の高機動ロケット砲システム HIMARS |
https://www.newsweekjapan.jp/stories/world/2022/07/post-99080.php
|
「セベロドネツクとリシチャンスクでのウクライナ軍の作戦はロシア軍の進軍を遅らせ、現地部隊に撤退・拠点移動の余裕を与えることが目的だった可能性がある」と、英王立統合軍事研究所の調査アナリスト、サム・クラニーエバンスは指摘する。 |
2022-07-11 16:45:00 |
IT |
週刊アスキー |
「こども編集者」を募集! 「東京都こども基本条例」のハンドブックを作り上げよう |
https://weekly.ascii.jp/elem/000/004/097/4097507/
|
編集者 |
2022-07-11 16:30:00 |
IT |
週刊アスキー |
肉×肉で最強「スパムむすび唐揚げマヨ」ファミリーマートで全国発売へ |
https://weekly.ascii.jp/elem/000/004/097/4097494/
|
発売 |
2022-07-11 16:15:00 |
IT |
週刊アスキー |
ゲーム開発を体験!「カプコン オープンカンファレンス RE:2022」を大阪と東京で開催決定 |
https://weekly.ascii.jp/elem/000/004/097/4097521/
|
開催決定 |
2022-07-11 16:10:00 |
マーケティング |
AdverTimes |
NTTデータ、アプリケーションD&M技術部長(22年8月1日付) |
https://www.advertimes.com/20220711/article389343/
|
dampm |
2022-07-11 07:54:47 |
マーケティング |
AdverTimes |
4マス減少は6カ月連続に 5月の広告業売上高 |
https://www.advertimes.com/20220711/article389333/
|
連続 |
2022-07-11 07:19:40 |
コメント
コメントを投稿