• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How do I create a test script using Shell script?

 
Ranch Hand
Posts: 821
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi experts,

I just learnt from my mentor that there is a way to create a shell script to run the whole gamut of testing without going thru Postman, as it is really a chore to test the end point one after another.

But, I wasn't told how to do it.

As such, I hope I can get some hints how to do it cos the only shell script  I ever learnt is the execute in a docker where you can indicate where is your file and then follows by what you want the script to do next, such as change drive, bringing in the various docker images etc etc.

But, in this new task that I hope to know, I have no idea how to begin...

Hope you guys can point me to some good resources to gain knowledge in this and how to write a shell script.

Thanks again.
 
Marshal
Posts: 5003
319
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, junit is your friend here. Combine it with the spring mock MVC stuff I referred to in one of your other topics and you're good to go
 
tangara goh
Ranch Hand
Posts: 821
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Cooke wrote:Again, junit is your friend here. Combine it with the spring mock MVC stuff I referred to in one of your other topics and you're good to go



Hi Tim,

I am abit confused hence I am writing to you.

Cos I was told to use the in-memory for testing.

As such, do I use Mock at all ?

Cos the reference link given to me is :


https://mkyong.com/spring-boot/spring-boot-spring-data-jpa



so, now I wonder do I use @InjectMock at all since I am using a @DataJpaTest

Kindly advise me.

Tks.
 
Tim Cooke
Marshal
Posts: 5003
319
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're talking about quite a few different concepts here. Initially you asked about a method in which you can automatically run a bunch of test cases, for which Junit is a good choice, and now you're talking about in memory databases, mocking, Spring Boot, and JPA.

My best recommendation at this point is this: Do one thing at a time.
 
I do some of my very best work in water. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic