6

I am trying to write some tests for a Samba client in Java, and need to find a framework that would create a mock Samba server. Something similar to the Mock FTP Server for the FTP protocol.

So far I could find only services that would mock a Samba library such as JCIFS, but not a Samba server. Is there a framework available for mocking a Samba server?

Any help or suggestion would be much appreciated.

Fleur
  • 666
  • 1
  • 8
  • 29
  • Sorry, but asking for tools/libraries is explicitly off topic here. – GhostCat Sep 17 '19 at 11:41
  • Oh! Is there a separate stack exchange site for such topics? – Fleur Sep 17 '19 at 11:42
  • There is: https://softwarerecs.stackexchange.com ... but make sure to **carefully** study their help information to determine if/how to write a request there. – GhostCat Sep 17 '19 at 11:45
  • What about https://www.shellvoide.com/hacks/how-to-setup-rogue-fake-smb-server-to-capture-credentials/ or https://www.hackers-arise.com/create-a-fake-smb-server-with-metas ? – GhostCat Sep 17 '19 at 11:52
  • Thanks for your suggestions. But what I'm looking for is a mock samba server that can be started using a Java code, as it can be done using Mock FTP server library. – Fleur Sep 17 '19 at 12:15
  • I guess you are looking for any SMB server mock, right? Samba is a specific implementation of one. Same way _jcifs_ in a general SMB client, not specifically Samba. – Oren Kishon Nov 13 '19 at 13:56
  • @Fleur - Did you find one? – Chidambaram Palaniappan Mar 04 '21 at 01:08

1 Answers1

-2

You can use junit+mockito. Create mock tree (file system analog) based on SmbFile-s

junit mockito tests for jcifs

terilya
  • 1
  • 1