Properties of a good unit test β
A unit test should have the following properties :
1οΈβ£ It should be automated and repeatable.
2οΈβ£ It should be easy to implement.
3οΈβ£ It should be relevant tomorrow.
4οΈβ£ Anyone should be able to run it at the push of a button.
5οΈβ£ It should run quickly.
6οΈβ£ It should be consistent in its results.
7οΈβ£ It should have full control of the unit under test.
8οΈβ£ It should be fully isolated (runs independently of other tests).
9οΈβ£ When it fails, it should be easy to detect what was expected and determine how to pinpoint the problem.
#UnitTest #Tips
@ProgrammingTip
A unit test should have the following properties :
1οΈβ£ It should be automated and repeatable.
2οΈβ£ It should be easy to implement.
3οΈβ£ It should be relevant tomorrow.
4οΈβ£ Anyone should be able to run it at the push of a button.
5οΈβ£ It should run quickly.
6οΈβ£ It should be consistent in its results.
7οΈβ£ It should have full control of the unit under test.
8οΈβ£ It should be fully isolated (runs independently of other tests).
9οΈβ£ When it fails, it should be easy to detect what was expected and determine how to pinpoint the problem.
#UnitTest #Tips
@ProgrammingTip
Why use isolation frameworksβ
An isolation framework is a set of programmable APIs that makes creating fake objects much simpler, faster, and shorter than hand-coding them. π¨
#UnitTest #Mock
@ProgrammingTip
An isolation framework is a set of programmable APIs that makes creating fake objects much simpler, faster, and shorter than hand-coding them. π¨
#UnitTest #Mock
@ProgrammingTip
The Safe Green Zone β
Locate your integration and unit tests in separate places.
By doing that, you give the developers on your team a safe green test area that contains only unit tests, where they know that they can get the latest code version.
They can run all tests in that namespace or folder, and the tests should all be green.
If some tests in the safe green zone donβt pass β ,
thereβs a real problem, not a (false positive) configuration problem in the test.
#UnitTest
@ProgrammingTip
Locate your integration and unit tests in separate places.
By doing that, you give the developers on your team a safe green test area that contains only unit tests, where they know that they can get the latest code version.
They can run all tests in that namespace or folder, and the tests should all be green.
If some tests in the safe green zone donβt pass β ,
thereβs a real problem, not a (false positive) configuration problem in the test.
#UnitTest
@ProgrammingTip
Tests are part of source control β
The test code you write needs to reside in a source control repository, just like your real production code.π¦
In fact, you should treat your test code as thoughtfully as you treat your production code. βοΈ
It should be part of the branch for each version of the product, and it should be part of the code that developers receive automatically when they get the latest version. π
Because unit tests are so connected to the code and API, they should always stay attached to the version of the code theyβre testing.
#UnitTest
@ProgrammingTip
The test code you write needs to reside in a source control repository, just like your real production code.π¦
In fact, you should treat your test code as thoughtfully as you treat your production code. βοΈ
It should be part of the branch for each version of the product, and it should be part of the code that developers receive automatically when they get the latest version. π
Because unit tests are so connected to the code and API, they should always stay attached to the version of the code theyβre testing.
#UnitTest
@ProgrammingTip
Renaming or Refactoring Tests β»οΈ
An unreadable test is more of a problem than a solution. ππΏ
It can hinder your codeβs readability and your understanding of any problems it finds. β
If you encounter a test that has a vague or misleading name or that can be made more maintainable, change the test code. β
#UnitTest
@ProgrammingTip
An unreadable test is more of a problem than a solution. ππΏ
It can hinder your codeβs readability and your understanding of any problems it finds. β
If you encounter a test that has a vague or misleading name or that can be made more maintainable, change the test code. β
#UnitTest
@ProgrammingTip
Unit Tests βοΈ
Tests are stories you tell the next generation of programmers on a project. βοΈ
They allow a developer to see exactly what an application is made of and where it started.
#UnitTest
@ProgrammingTip π»
Tests are stories you tell the next generation of programmers on a project. βοΈ
They allow a developer to see exactly what an application is made of and where it started.
#UnitTest
@ProgrammingTip π»
Creating ASP.NET Core Project β Angular 4, Vue, React βοΈ
1οΈβ£ First you need to download & install Node.js from here :
https://nodejs.org/en/
2οΈβ£ Then you need to install Yeoman Generator, run this command in cmd :
3οΈβ£ Then you need to install ASP.NET Core SPA Generator for Yeoman, run this command :
4οΈβ£ Finally create a new folder ( Project Folder ) and navigate that with cmd and run this command :
After running this command, you can choose which client technology you want to use with ASP.NET Core like Angular, Vue, React, Aurelia & ...
#aspnet #core #angular
@ProgrammingTip
1οΈβ£ First you need to download & install Node.js from here :
https://nodejs.org/en/
2οΈβ£ Then you need to install Yeoman Generator, run this command in cmd :
npm install -g yo
3οΈβ£ Then you need to install ASP.NET Core SPA Generator for Yeoman, run this command :
npm install -g yo generator-aspnetcore-spa
4οΈβ£ Finally create a new folder ( Project Folder ) and navigate that with cmd and run this command :
yo aspnetcore-spa
After running this command, you can choose which client technology you want to use with ASP.NET Core like Angular, Vue, React, Aurelia & ...
#aspnet #core #angular
@ProgrammingTip
The compiler doesn't care whether the code is ugly or clean. π€·π»ββοΈ
But when we change the system, there is a human involved, and humans do care. ππ»ββοΈ
#CleanCode
@ProgrammingTip
But when we change the system, there is a human involved, and humans do care. ππ»ββοΈ
#CleanCode
@ProgrammingTip
Use Strings carefully β οΈ
If two Strings are concatenated using β+β operator in a βforβ loop, then it creates a new String Object, every time.
This causes wastage of Memory and increases Performance time.
Also, while instantiating a String Object, constructors should be avoided and instantiation should happen directly. For example:
#memory #java #string
@ProgrammingTip
If two Strings are concatenated using β+β operator in a βforβ loop, then it creates a new String Object, every time.
This causes wastage of Memory and increases Performance time.
Also, while instantiating a String Object, constructors should be avoided and instantiation should happen directly. For example:
//Slower Instantiation β
String bad = new String("string object");
//Faster Instantiation β
String good = "string object";
#memory #java #string
@ProgrammingTip
Avoiding Memory Leaks By Simple Tricks β
Memory Leaks often cause performance degradation of software. Since, Java manages memory automatically, the developers do not have much control.
But there are still some standard practices which can be used to protect from memory leakages. ππ»ββοΈ
1οΈβ£ - Always release database connections when querying is complete.
2οΈβ£ - Try to use Finally block as often possible.
3οΈβ£ - Release instances stored in Static Tables.
#java #memory #performance
@programmingTip
Memory Leaks often cause performance degradation of software. Since, Java manages memory automatically, the developers do not have much control.
But there are still some standard practices which can be used to protect from memory leakages. ππ»ββοΈ
1οΈβ£ - Always release database connections when querying is complete.
2οΈβ£ - Try to use Finally block as often possible.
3οΈβ£ - Release instances stored in Static Tables.
#java #memory #performance
@programmingTip
Bootstrap Studio π
±οΈ
A powerful desktop app for creating responsive websites using the Bootstrap framework.
https://bootstrapstudio.io/
#Bootstrap
@ProgrammingTip
A powerful desktop app for creating responsive websites using the Bootstrap framework.
https://bootstrapstudio.io/
#Bootstrap
@ProgrammingTip
Bootstrap Studio 2.2.4 Professional Edition.exe
47.5 MB
Bootstrap Studio Version 2.2.4 Professional Edition π¦
Media is too big
VIEW IN TELEGRAM
Creating a Responsive website using Boostrap Studio Tutorial βοΈ
What the f*ck JavaScript? π€·π»ββοΈ
A list of funny and tricky JavaScript examples :
https://github.com/denysdovhan/wtfjs
#JavaScript #Fun
@ProgrammingTip
A list of funny and tricky JavaScript examples :
https://github.com/denysdovhan/wtfjs
#JavaScript #Fun
@ProgrammingTip
55 Checkboxes With Online Demo & Source Code πΎ
http://freefrontend.com/css-checkboxes/
#CSS #UI
@ProgrammingTip
http://freefrontend.com/css-checkboxes/
#CSS #UI
@ProgrammingTip
The Majesty of Vue.js.pdf
9.5 MB
The Majesty of Vue.js π
Author : Alex Kyriakidis π
Simple explained ππ»
#Book #Vue #JavaScript
@ProgrammingTip
Author : Alex Kyriakidis π
Simple explained ππ»
#Book #Vue #JavaScript
@ProgrammingTip
JSF*ck π€¦π»ββοΈ
It's a programming style based on the atomic parts of JavaScript.
It uses only 6 different characters to write and execute code.
Try it one time π€£
http://www.jsfuck.com/
#Fun #JavaScript
@ProgrammingTip
It's a programming style based on the atomic parts of JavaScript.
It uses only 6 different characters to write and execute code.
Try it one time π€£
http://www.jsfuck.com/
#Fun #JavaScript
@ProgrammingTip
Jsfuck
JSFuck - Write any JavaScript with 6 Characters: []()!+
JSFuck is an esoteric and educational programming style based on the atomic parts of JavaScript. It uses only six different characters to execute code.
Visual Studio Code treasures π
A list of Visual Studio Code extensions i canβt live without them.
http://bit.do/vscode
#Extensions #VSCode
@ProgrammingTip
A list of Visual Studio Code extensions i canβt live without them.
http://bit.do/vscode
#Extensions #VSCode
@ProgrammingTip
Medium
π Visual Studio Code treasures
a list of Visual Studio Code extensions I canβt live without