Contributions
Re: Apache Kafka consumer in SOAPUI pro
I get toomany errors, therefore this seems for mebe not straight forward. Theexample code is: Properties props = new Properties(); props.setProperty("bootstrap.servers", "localhost:9092"); props.setProperty("group.id", "test"); props.setProperty("enable.auto.commit", "true"); props.setProperty("auto.commit.interval.ms", "1000"); props.setProperty("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer"); props.setProperty("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer"); KafkaConsumer<String, String> consumer = new KafkaConsumer<>(props); consumer.subscribe(Arrays.asList("foo", "bar")); while (true) { ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100)); for (ConsumerRecord<String, String> record : records) System.out.printf("offset = %d, key = %s, value = %s%n", record.offset(), record.key(), record.value()); } Do you know what to add into the lace braces instead of "String, String"? KafkaConsumer<String, String> ConsumerRecords<String, String>6 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.3KViews0likes1CommentApache Kafka consumer in SOAPUI pro
Hi, Can anyone help me in recording and asserting the data from a kafka producer application in SOAPUI Pro? I tried with groovy script and example code from the apache website but I was not successful yet. Thanky in advance. Regards MarkusSolved6 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.5KViews0likes3CommentsRe: Extract certain strings from JSON data strucure
Hi Todd, thanks but the number of instances of interface-name with "cons" in my json structure varies. "cons0" and "cons1" was just as an example. So I need a tip how to set properties dynamically. Markus6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.8KViews0likes1CommentRe: Extract certain strings from JSON data strucure
Thank you for the code, it works fine :smileyhappy: One more question: Instead of having "cons0" and "cons1" in the log output window, how are they going into a property for further use? Markus6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.9KViews0likes3CommentsRe: Extract certain strings from JSON data strucure
Hi rich, thank youyou for your input. Forgot to say thatthe data is queried from a server with RESTGET request. The number of "interface-name" instances and the values in the REST response are varying. So, the easy way tojust do a transfer from a fixed position into a property is not working. I was thinking about parsing all "interface-name" instancesin the REST response with a filter string to store only a certain subset of values for further use. Any ideas how to do that in SOAPUI pro? BR Markus6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.9KViews0likes1CommentExtract certain strings from JSON data strucure
Hello community, I have the following JSON formatted data: { "interfaces" : { "interface" : [ { "interface-name" : "eth0" }, { "interface-name" : "eth1" }, { "interface-name" : "cons0" }, { "interface-name" : "cons1" } ] } } I only want to have the strings"cons0" and "cons1" extracted/tansferedinto e. g. an arrary for further usage ina SOAPUItest case. Does anyone hasan idea? Thanks in advance MarkusSolved6 years agoPlace ReadyAPI QuestionsReadyAPI Questions3KViews0likes9CommentsHow to define a resource path with same parameter name
Hello, I want to test with SOAPUI PRO a RESTful interface with the following target URL: /interface;ip=1.2.3.4/rack;id=1/shelf;id=1/slot;id=1/port;id=1 The parameter "id" is used multiple times (in rack, in shelf, in slot and in port). I created /rack, /shelf, /slot and /port as child resources of /interface but SOAPUI fails, when I try to add "id" as a parameter (Style MATRIX) to each of the childs. It seems for me SOAPUI does not support two ore more parameters with the same name in one resource. Any idea how tosolve this issue? Thanks in advance. Regards Markus8 years agoPlace ReadyAPI QuestionsReadyAPI Questions2KViews0likes2Comments