DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Avatar

Ajitesh Kumar

Technology Blogger at Vitalflux.com

Hyderabad, IN

Joined Feb 2005

https://vitalflux.com

About

Ajitesh is passionate about various different technologies including programming languages such as Java/JEE, Javascript, PHP, .NET, C/C++, SCALA, mobile programming languages etc and, computing fundamentals such as application security, cloud computing, API, mobile apps, google glass, big data etc. He is also focusing on Big Data, especially, data science aspect of Big Data. Currently, he has been working on creating a framework for Data Science QA and Quality Control Checks.

Stats

Reputation: 2237
Pageviews: 7.2M
Articles: 67
Comments: 12
  • Articles
  • Comments

Articles

article thumbnail
7 Popular Unit Test Naming Conventions
The article presents a compiled list of unit tests naming strategy that one could follow for naming their unit tests. The article is intended to be a quick reference instead of going through multiple great pages such as following. That said, to know greater details, please feel free access one of these pages listed below and know for yourself. What are some popular naming conventions for unit tests? Unit Tests Naming Best Practices GivenWhenThen Technique How to Unit Test Stream Pipelines and Lambdas CI/CD Pipeline Testing Following are 7 popular unit tests naming conventions that are found to be used by majority of developers and compiled from above pages: MethodName_StateUnderTest_ExpectedBehavior: There are arguments against this strategy that if method names change as part of code refactoring than test name like this should also change or it becomes difficult to comprehend at a later stage. Following are some of the example: isAdult_AgeLessThan18_False withdrawMoney_InvalidAccount_ExceptionThrown admitStudent_MissingMandatoryFields_FailToAdmit MethodName_ExpectedBehavior_StateUnderTest: Slightly tweaked from above, but a section of developers also recommend using this naming technique. This technique also has the disadvantage that if method names get changed, it becomes difficult to comprehend at a later stage. Following is how tests in first example would read like if named using this technique: isAdult_False_AgeLessThan18 withdrawMoney_ThrowsException_IfAccountIsInvalid admitStudent_FailToAdmit_IfMandatoryFieldsAreMissing test[Feature being tested]: This one makes it easy to read the test as the feature to be tested is written as part of test name. Although, there are arguments that the “test” prefix is redundant. However, some sections of developer love to use this technique. Following is how the above tests would read like if named using this technique: testIsNotAnAdultIfAgeLessThan18 testFailToWithdrawMoneyIfAccountIsInvalid testStudentIsNotAdmittedIfMandatoryFieldsAreMissing Feature to be tested: Many suggest that it is better to simply write the feature to be tested because one is anyway using annotations to identify method as test methods. It is also recommended for the reason that it makes unit tests as an alternate form of documentation and avoids code smells. Following is how tests in first example would read like if named using this technique: IsNotAnAdultIfAgeLessThan18 FailToWithdrawMoneyIfAccountIsInvalid StudentIsNotAdmittedIfMandatoryFieldsAreMissing Should_ExpectedBehavior_When_StateUnderTest: This technique is also used by many as it makes it easy to read the tests. Following is how tests in first example would read like if named using this technique: Should_ThrowException_When_AgeLessThan18 Should_FailToWithdrawMoney_ForInvalidAccount Should_FailToAdmit_IfMandatoryFieldsAreMissing When_StateUnderTest_Expect_ExpectedBehavior: Following is how tests in first example would read like if named using this technique: When_AgeLessThan18_Expect_isAdultAsFalse When_InvalidAccount_Expect_WithdrawMoneyToFail When_MandatoryFieldsAreMissing_Expect_StudentAdmissionToFail Given_Preconditions_When_StateUnderTest_Then_ExpectedBehavior: This approach is based on a naming convention developed as part of Behavior-Driven Development (BDD). The idea is to break down the tests into three part such that one could come up with preconditions, state under test and expected behavior to be written in the above format. Following is how tests in first example would read like if named using this technique: Given_UserIsAuthenticated_When_InvalidAccountNumberIsUsedToWithdrawMoney_Then_TransactionsWillFail My personal favorite is naming unit tests based on the writing features of the class under test. It helps me to make sure that a class follows single responsibility. It also aids a great deal in code refactoring. Related: How to Integrate Cucumber for Spring Boot Integration Tests
October 23, 2023
· 728,857 Views · 31 Likes
article thumbnail
Data Science Project Folder Structure
One of the more annoying parts of any coding project can be setting up your environment. In this post, we look at some ways to organize your data science project.
Updated June 21, 2022
· 27,872 Views · 5 Likes
article thumbnail
Free Datasets for Machine Learning and Deep Learning
A great, free resource for training data!
February 27, 2021
· 7,344 Views · 2 Likes
article thumbnail
Product Manager: Machine Learning Interview Questions
In this post, you will learn about some of the interview questions that can be asked in the product manager/business analyst job.
November 11, 2020
· 12,955 Views · 4 Likes
article thumbnail
Python: How to Add a Trend Line to a Line Chart/Graph
In this article, you will learn how to add a trend line to the line chart/line graph using Python Matplotlib.
October 30, 2020
· 68,785 Views · 4 Likes
article thumbnail
How to Setup/Install MLFlow and Get Started
In this post, you will learn about how to setup/install MLFlow right from your Jupyter Notebook and get started tracking your machine learning projects.
October 29, 2020
· 15,359 Views · 2 Likes
article thumbnail
Adaline Explained With Python Example
In this post, you will learn the concepts of Adaline (ADAptive LInear NEuron), a machine learning algorithm, along with a Python example.
October 20, 2020
· 17,836 Views · 3 Likes
article thumbnail
Neural Networks and Mathematical Models Examples
In this post, you will learn about concepts of neural networks with the help of mathematical models examples. In simple words, you will learn about how to re...
October 20, 2020
· 4,794 Views · 3 Likes
article thumbnail
Perceptron Explained Using Python Example - Data Analytics
In this post, you will learn about the concepts of Perceptron with the help of Python example. It is very important for data scientists to understand the con...
October 20, 2020
· 20,365 Views · 6 Likes
article thumbnail
NLTK Hello World Python Example
Learn how to get started with natural language processing (NLP) with (Natural Language Toolkit), a platform to work with human language using Python language.
Updated October 9, 2020
· 7,126 Views · 6 Likes
article thumbnail
Deep Learning Explained in Layman's Terms
In this post, you will get to learn deep learning through a simple explanation (layman terms) and examples.
October 8, 2020
· 9,759 Views · 4 Likes
article thumbnail
KMeans Silhouette Score Explained With Python Example
In this post, you will learn about the concepts of KMeans Silhouette Score in relation to assessing the quality of K-Means clusters fit on the data.
September 17, 2020
· 163,759 Views · 1 Like
article thumbnail
Python - 5 Sets of Useful Numpy Unary Functions - Data Analytics
In this post, you will learn about some of the 5 most popular or useful set of unary universal functions (ufuncs) provided by Python Numpy library.
September 15, 2020
· 4,128 Views · 1 Like
article thumbnail
What, When, and How of Scatterplot Matrix in Python - Data Analytics
In this post, you will learn about some of the following in relation to scatterplot matrix.
September 10, 2020
· 21,937 Views · 4 Likes
article thumbnail
Imputing Missing Data Using Sklearn SimpleImputer
In this post, learn how to use Python's Sklearn SimpleImputer for imputing/replacing numerical and categorical missing data using different strategies.
August 18, 2020
· 30,332 Views · 2 Likes
article thumbnail
Decision Tree Classifier Python Code Example
In this post, you will learn about how to train a decision tree classifier machine learning model using Python.
July 29, 2020
· 14,655 Views · 3 Likes
article thumbnail
SVM RBF Kernel Parameters With Code Examples
In this post, you will learn about SVM RBF (Radial Basis Function) kernel hyperparameters with the python code example.
July 28, 2020
· 19,448 Views · 2 Likes
article thumbnail
The What, When, and Why of Regularization in Machine Learning
Learn more about regularization in machine learning.
Updated July 10, 2019
· 10,387 Views · 2 Likes
article thumbnail
Machine Learning Models: Bias Mitigation Strategies
Discrimination-aware Machine Learning models are helping to change the way technology detects and mitigates bias.
November 20, 2018
· 11,744 Views · 1 Like
article thumbnail
Security Attacks: Analysis of Machine Learning Models
Want to learn more about security for machine learning models? Check out this post to learn more about ML, security, attacks, and more.
October 9, 2018
· 9,509 Views · 2 Likes
article thumbnail
QA: How Reliable Are Your Machine Learning Systems?
Let's learn about what the reliability of ML systems is, why you should bother with ML model's reliability, and who should take care of the ML system's reliability.
Updated October 1, 2018
· 6,235 Views · 5 Likes
article thumbnail
ML Metrics: Sensitivity vs. Specificity
In this post, you will learn about the concepts related to Sensitivity and Specificity and how are they used for measuring the Machine Learning model performance.
Updated September 27, 2018
· 70,502 Views · 3 Likes
article thumbnail
QA: Blackbox Testing for Machine Learning Models
In this post, you will learn about different Blackbox Testing techniques for testing machine learning (ML) models.
September 4, 2018
· 47,013 Views · 4 Likes
article thumbnail
Assessing Quality of AI Models from QA Standpoint
In this post, you will learn about the definition of quality of AI/Machine Learning (ML) models.
August 25, 2018
· 5,336 Views · 3 Likes
article thumbnail
Testing Features of ML Models
In this post, you will learn about different types of test cases that you could come up for testing features of the data science/Machine Learning models.
Updated August 17, 2018
· 9,282 Views · 2 Likes
article thumbnail
QA for Machine Learning Models With the PDCA Cycle
Learn how DevOps and AI come together in the PDCA cycle to create a strategy for DevOps-style quality assurance of machine learning and data science projects.
August 12, 2018
· 12,760 Views · 2 Likes
article thumbnail
Quality Assurance and Testing the ML Model
This article delves into the meaning of quality assurance and looks at what can be tested with ML models.
August 9, 2018
· 19,365 Views · 2 Likes
article thumbnail
MongoDB Commands Cheat Sheet for Beginners
New to MongoDB? Then this command cheat sheet will come in handy. Even if you aren't a Mongo rookie, this sheet may still be useful to you!
July 9, 2018
· 83,607 Views · 8 Likes
article thumbnail
Integrate SendGrid With a Spring Boot and Java App
In this post, you will learn how to integrate SendGrid's Java Web APIs into your Spring Boot application. Read on to get started!
April 16, 2018
· 34,380 Views · 4 Likes
article thumbnail
Using Google Cloud Text-to-Speech With Java
Google Cloud recently released a new text-to-speech service. Let's take it for a test run with a Spring Boot app to see how to work with it in Java.
April 2, 2018
· 34,685 Views · 8 Likes

Comments

QA: Blackbox Testing for Machine Learning Models

Apr 25, 2019 · Lauren Forbes

Pls reach out to me on my email address: ajitesh@gmail.com

Using Google Cloud Text-to-Speech With Java

Apr 03, 2018 · Mike Gates

Hi Naresh:

There is a pricing associated with this service. https://cloud.google.com/text-to-speech/pricing

Hope it helps.

Understanding JVM Internals, from Basic Structure to Java SE 7 Features

Nov 02, 2016 · Eric Genesky

great article..thanks!

Java - Top 5 Exception Handling Coding Practices to Avoid

Oct 01, 2014 · John Walter

Thanks for your comment. The idea I wanted to put is to throw custom runtime exceptions instead of generic exception such as "RuntimeException". This is primarily because the caller cannot examine the exception to determine why it was thrown and consequently can/may not attempt recovery.

Introduction to Apache Maven: A build framework & build automation tool

Oct 01, 2014 · Viral Patel

Thanks for your comment. The idea I wanted to put is to throw custom runtime exceptions instead of generic exception such as "RuntimeException". This is primarily because the caller cannot examine the exception to determine why it was thrown and consequently can/may not attempt recovery.

The 7 Habits of Highly Effective Developers

Feb 11, 2014 · Ajitesh Kumar

thanks for the comments
Tim Berners-Lee: we need to re-decentralise the web

Feb 07, 2014 · Tony Thomas

how very true is that...!
Top 4 Security Books Developers Would Want to Keep Handy

Feb 04, 2014 · Ajitesh Kumar

Thanks for suggesting. Quite an interesting link on security risks.
List of Application Security Forums/Groups You Would Want to Frequently Visit

Jan 24, 2014 · Ajitesh Kumar

thanks for sharing the links.
Top 7 Secured Practices for Securing Your Partner APIs

Dec 21, 2013 · Ajitesh Kumar

Thanks for your comments. The idea is to reiterate the security practices for newbies and developers looking out for such information vis-a-vis mentioning them in the list of OWASP top 10 security threat. You must have observed that I tried and relate the points with OWASP listed security threats.
Security Code Review Tips for Application Developers

Nov 18, 2013 · Ajitesh Kumar

Thanks for your comments. Would try the tool and share my comments.
Top 5 Secured Application Development Practices

Nov 04, 2013 · Ajitesh Kumar

Thanks Gene for your comments. I shall come up with a explanations shortly.

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: