wiktor.ovh - Blog









Search Preview

Blog – Wiktor Tech Notes

wiktor.ovh
Skip to content Wiktor Tech Notes Software Development Notes, Articles, Blog posts, Links And Comments
.ovh > wiktor.ovh

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Blog – Wiktor Tech Notes
Text / HTML ratio 1 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud = def services Posted service tests integration application REST test page Restito Search void start private Cucumber Immutables author
Keywords consistency
Keyword Content Title Description Headings
= 24
def 17
services 10
Posted 10
service 8
8
Headings
H1 H2 H3 H4 H5 H6
3 26 2 0 0 0
Images We found 3 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
= 24 1.20 %
def 17 0.85 %
services 10 0.50 %
Posted 10 0.50 %
service 8 0.40 %
8 0.40 %
tests 7 0.35 %
integration 7 0.35 %
application 7 0.35 %
REST 7 0.35 %
test 6 0.30 %
page 6 0.30 %
Restito 6 0.30 %
Search 6 0.30 %
void 5 0.25 %
start 5 0.25 %
private 5 0.25 %
Cucumber 5 0.25 %
Immutables 5 0.25 %
author 5 0.25 %

SEO Keywords (Two Word)

Keyword Occurrence Density
Posted on 10 0.50 %
= new 7 0.35 %
you can 6 0.30 %
REST services 4 0.20 %
meta tags 4 0.20 %
and integration 4 0.20 %
as a 4 0.20 %
a service 4 0.20 %
tests using 4 0.20 %
your application 3 0.15 %
there is 3 0.15 %
of a 3 0.15 %
public void 3 0.15 %
Separating unit 3 0.15 %
is a 3 0.15 %
It is 3 0.15 %
You can 3 0.15 %
is author 3 0.15 %
need to 3 0.15 %
springboot and 3 0.15 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
as a service 4 0.20 % No
Separating unit and 3 0.15 % No
using springboot and 3 0.15 % No
tests using Gradle 3 0.15 % No
integration tests using 3 0.15 % No
and integration tests 3 0.15 % No
unit and integration 3 0.15 % No
def entity = 2 0.10 % No
of a page 2 0.10 % No
Spring boot application 2 0.10 % No
tags of a 2 0.10 % No
meta tags of 2 0.10 % No
html meta tags 2 0.10 % No
entity = new 2 0.10 % No
that you can 2 0.10 % No
REST services using 2 0.10 % No
Running Spring boot 2 0.10 % No
in Java – 2 0.10 % No
example of how 2 0.10 % No
boot application as 2 0.10 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
Separating unit and integration 3 0.15 % No
unit and integration tests 3 0.15 % No
and integration tests using 3 0.15 % No
integration tests using Gradle 3 0.15 % No
ComposerPackagist package Junior Grossi 2 0.10 % No
Immutables in Java – 2 0.10 % No
meta tags of a 2 0.10 % No
tags of a page 2 0.10 % No
def entity = new 2 0.10 % No
Running Spring boot application 2 0.10 % No
Spring boot application as 2 0.10 % No
boot application as a 2 0.10 % No
application as a service 2 0.10 % No
as a service linux 2 0.10 % No
Java – Marcus Biel 2 0.10 % No
Mock REST services using 2 0.10 % No
services using Restito Examples 2 0.10 % No
REST services using Restito 2 0.10 % No
crawlling website meta tags 2 0.10 % No
REST services stubbing example 2 0.10 % No

Internal links in - wiktor.ovh

About Author
About Author – Wiktor Tech Notes
Blog
Blog – Wiktor Tech Notes
Contact
Contact – Wiktor Tech Notes
Groovy for crawlling website meta tags
Groovy for crawlling website meta tags – Wiktor Tech Notes
REST services stubbing example using springboot and wiremock
REST services stubbing example using springboot and wiremock – Wiktor Tech Notes
Mock REST services using Restito Examples
Mock REST services using Restito Examples – Wiktor Tech Notes
example
example – Wiktor Tech Notes
good practices
good practices – Wiktor Tech Notes
gradle
gradle – Wiktor Tech Notes
groovy
groovy – Wiktor Tech Notes
html
html – Wiktor Tech Notes
immutables
immutables – Wiktor Tech Notes
integration
integration – Wiktor Tech Notes
java
java – Wiktor Tech Notes
meta
meta – Wiktor Tech Notes
microservices
microservices – Wiktor Tech Notes
mock
mock – Wiktor Tech Notes
packagist
packagist – Wiktor Tech Notes
php
php – Wiktor Tech Notes
rest
rest – Wiktor Tech Notes
snippet
snippet – Wiktor Tech Notes
soa
soa – Wiktor Tech Notes
spring
spring – Wiktor Tech Notes
test
test – Wiktor Tech Notes
tutorial
tutorial – Wiktor Tech Notes
wiremock
wiremock – Wiktor Tech Notes
Composer
Composer – Wiktor Tech Notes
Cucumber
Cucumber – Wiktor Tech Notes
Immutables
Immutables – Wiktor Tech Notes
Java
Java – Wiktor Tech Notes
Microsoft Visual Studio
Microsoft Visual Studio – Wiktor Tech Notes
PHP
PHP – Wiktor Tech Notes
REST
REST – Wiktor Tech Notes
Sample
Sample – Wiktor Tech Notes
Snippet
Snippet – Wiktor Tech Notes
spring
spring – Wiktor Tech Notes
Uncategorized
Uncategorized – Wiktor Tech Notes
Windows
Windows – Wiktor Tech Notes

Wiktor.ovh Spined HTML


Blog – Wiktor Tech Notes Skip to content Wiktor Tech Notes SoftwareMinutiaeNotes, Articles, Blog posts, Links And Comments Menu Front PageWell-nighAuthor Blog Contact Blog Posted on 2017-07-05Groovy for crawlling website meta tags How to quickly get html meta tags of a page ? Here you can grab a short example of how to trickle html meta tags of a page. import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; def url = "http://wordpress.com"; def document = Jsoup.connect(url).get(); def metaTags = document.getElementsByTag("meta"); for (Element metaTag: metaTags) { def tagName = metaTag.attr("name") def tagProperty = metaTag.attr("property") def tagContent = metaTag.attr("content") println String.format("Name: %s, property : %s, content : %s", tagName, tagProperty, tagContent); } Posted on 2017-03-22REST services stubbing example using springboot and wiremock Integration testing of microservices The main goal of Service Oriented Architecture is to pinpoint services that focus on delivering small, meaty and most well-constructed piece of merchantry logic. To unhook well-constructed user features, many services need to communicate with each other. That liaison is often implemented as simple REST requests. The example I’ve prepared a simple repository with working example of a simple rest service implemented using springboot and integration tested using wiremock. Please, checkout the repo : https://github.com/youngeagle87/wiremock-example You can run the tests using writ : for windows : gradlew test for any other proper commandline ./gradlew test Posted on 2017-03-212017-03-21Mock REST services using Restito Examples Integration testing I have been developing rest microservices for years now, and I unchangingly had weightier results by focusing on the integration testing of the services, instead of tent scrutinizingly 100% of lawmaking by unit tests. I usually use one of two tools : Wiremock and Restito. The nomination between them is not obvious. It’s rather a team visualization or preference. Usually the tool that have been used increasingly recently wins, without massive superiority over the other option. Restito It is a framework that can be used for stubbing http responses, simulating other microservice responses. The power of such stubs is that you can test your using versus several malfunction of services that your using depends on. Example 1. The base, extendable integration test specification The lawmaking unelevated shows the usage of restito StubServer for stubbing a remote service. Toolset : Spock and Groovy. matriculation IntegrationSpecification extends Specification { private static final Integer port = 9090; protected StubServer server; @Shared ConfigurableApplicationContext context @Before public void start() { server = new StubServer(port).run(); } @After public void stop() { server.stop(); } void setupSpec() { Future future = Executors .newSingleThreadExecutor().submit( new Callable() { @Override public ConfigurableApplicationContext call() throws Exception { return (ConfigurableApplicationContext) SpringApplication .run(YourMainApplication.class) } }) context = future.get(60, TimeUnit.SECONDS) } void cleanupSpec() { if (context != null) { context.close() } } } In the lawmaking above, there is a setupSpec() method. It is not obligatory for you to have it like this. It is an example of how your Spring using can be started by Spock tests. Example 2. The test implementation. @IntegrationTest @SpringApplicationConfiguration(CogniTwitterApplication.class) @ActiveProfiles("test") matriculation SearchEndpointTest extends IntegrationSpecification { private om = new ObjectMapper() def "get search params should return filled values when set"() { given: def restTemplate = new RestTemplate(); def oauthResponse = new AccessGrant("exampleAccessToken"); def searchResponse = [new TweetDto(1,"test",new UserDto("testuser",null),null,"2014-01-01 00:00:00")] as List //first Restito Stub whenHttp(server). match(get("/oauth2/token")). then( status(HttpStatus.OK_200), stringContent(om.writeValueAsString(oauthResponse)) ); //second Restito Stub whenHttp(server). match(get("/1.1/search/tweets.json?q=*")). then( status(HttpStatus.OK_200), stringContent(om.writeValueAsString(searchResponse)) ); HttpHeaders headers = prepareSelectedSearchParamsSession(restTemplate) when: def response2 = restTemplate.exchange( "http://localhost:8080/search", HttpMethod.GET, prepareEntityWithHeaders(headers), TweetDto[].class); then: response2.statusCode.value() == HttpStatus.OK_200.statusCode } private HttpHeaders prepareSelectedSearchParamsSession(RestTemplate restTemplate) { def headers = prepareHeaders() def entity = new HttpEntity("{\"keywords\":\"spring\",\"channel\":null}", headers) def response = restTemplate.exchange("http://localhost:8080/searchParams", HttpMethod.POST, entity, Void.class); def session = response.getHeaders().get("Set-Cookie").get(0).split(";")[0]; headers.add(COOKIE, session); headers } private HttpEntity prepareEntityWithHeaders(headers) { def entity = new HttpEntity(null, headers) entity } private HttpHeaders prepareHeaders() { def preparedHeaders = new HttpHeaders(); preparedHeaders.add(CONTENT_TYPE, APPLICATION_JSON_VALUE); preparedHeaders } } Posted on 2017-03-212017-03-21Separating unit and integration tests using Gradle A Must-Have for micro services minutiae in Spring. Read from Source on http://selimober.com : Separating unit and integration tests using Gradle Posted on 2017-03-02Running Spring marching using as a service (linux) You can hands make your using run as a service on your hosts. If you have few machines, you can use simple init.d service To make your built using start as a service, all you need to do is : sudo link -s /path/to/your/app/yourapp.jar /etc/init.d/yourappservice And directly without that you can start the yourappservice as you have the service configured ./etc/init.d/yourappservice start That’t it! On increasingly complicated environments (many instances, or deject env) you should probably use supervisor to tenancy your services. You can trammels it out here : http://supervisord.org/running.html#adding-a-program Posted on 2017-01-25Creating your first Composer/Packagist package | Junior Grossi Junior Grossi wrote quick tutorial well-nigh creating composer packages “Hi everybody! Today I’ll write well-nigh how you can contribute with PHP polity creating packages (or updating your’s) using Composer and Packagist. First, if you’re a PHP developer and don’t know yet what is Composer, take a squint on the post Why you should use Composer and how to start using it to get increasingly information about.”Trammelsout the source : Creating your first Composer/Packagist package | Junior Grossi Posted on 2017-01-132017-01-13Immutables in Java – Marcus Biel What is an Immutable? Advantages of Immutables Disadvantages of Immutables In this article you’ll proceeds knowledge well-nigh whilom topics. Please, visit the Marcus Biel’s vendible in source! Source: Immutables in Java – Marcus Biel Posted on 2017-01-13WindowsMinutiae– REST vendee – HttpClient – lawmaking samples Windows-universal-samples – API samples for the Universal Windows Platform. Source: Windows-universal-samples/Samples/HttpClient at master · Microsoft/Windows-universal-samples · GitHub Posted on 2017-01-04Just Enough Regular Expressions for Cucumber – Agile For All Jon Archer wrote well-nigh how Cucumber makes knowledge of regular expressions important. He’s right: Regular expressions are the key to Cucumber’s flexibility. Well-crafted regular expressions let you reuse step definitions, lamister duplication and keeping your tests maintainable. But plane experienced developers … ( Read More on source ) Source: Just Enough Regular Expressions for Cucumber – Agile For All Posted on 2017-01-042017-01-04Cucumber statement definition parameters : 1st, 2nd, 3rd, 4th Sometimes there is need to handle one of many ordered items on page, we can use integer as identifier, but it looks unnatural, for example : User named “John” is tragedian of 1 vendible The number is misleading : it can be read as one, but we would like it to be read like “first”.Unelevatedthere is a Java example, where you can use both patterns (1st or 1). @Then("^User named \"(.*)\" is tragedian of \"(\\d+)(?:st|nd|rd|th)\" article$") public void UserNamedIsAuthorOfNthArticle(String name, int nth) { boolean isAuthor = testPage.getNthArticle(nth).getAuthor().equals(name); assertTrue("User named " + name + " is tragedian of " + nth + " article", isAuthor); } Social & Sharing Share List Search this page Search for: Search Recent posts Groovy for crawlling website meta tags 2017-07-05 REST services stubbing example using springboot and wiremock 2017-03-22 Mock REST services using Restito Examples 2017-03-21 Separating unit and integration tests using Gradle 2017-03-21 Running Spring marching using as a service (linux) 2017-03-02 Tagscomposer example good practices gradle groovy html immutables integration java meta microservices mock packagist php rest snippet soa spring test tutorial wiremock TagsComposer Cucumber Immutables Java Microsoft Visual Studio PHP REST Sample Snippet spring Uncategorized Windows Sources and ownership Contents of this page are mostly found over the web, but I unchangingly put original author. If you are tragedian and you've found your post, tutorial, or whatever that belongs to you and I did not mention it, please write me! Search on this page Search for: Search Facebook Tumblr E-mail Proudly powered by WordPress